This article shows how to build ArduPilot with Arduino on Windows. It covers:
- From Copter Version 3.1
- From Plane version 2.76
- APM 2.0, 2.5, and 2.6 only
Plane, Rover and AntennaTracker builds can still be installed.
- 1 Step 1 Install Git-SCM
- 1.1 On the Welcome screen and then again on the License screen click the Next button
- 1.2 On the Select Components screen click on the Next button, then click the Finish button
- 1.3 Click the Next button in the Replacing in Use Files Screen, then wait for Git to finish loading
- 1.4 Select the Checkout Windows item and the Next button then Select the Run Git from Windows item and the Next button.
- 2 Step 2 Download source
- 3 Step 3 Install MHV_AVR_Tools to its default location.
- 4 Step 4 Install ArduPilot-Arduino
- 5 Step 5. Configure Arduino
- 6 Step 6 Connect your APM to your USB
- 7 Step 7 Configure Arducopter.
- 8 Step 8 Upload to your ArduPilot.
- 9 Updating your code
Step 1 Install Git-SCM
Step 2 Download source
In your C: drive, make a folder called GIT
Right click anywhere in the folder and click git bash
In this screen type
git clone git://github.com/diydrones/ardupilot.git
When it is finished it should look like this….
Step 3 Install MHV_AVR_Tools to its default location.
Check both items in the Choose Components Screen and select Next then select Next again to install to the default location
Step 4 Install ArduPilot-Arduino
Next unzip the special ArduPilot Arduino package
This is a new version, using the 4.7.2 version of GCC
I unzipped this Directly to my C: drive.
Step 5. Configure Arduino
Go to your Arduino folder
Double click the Arduino icon
When Arduino opens, go to the file menu
Set Sketchbook location to your Ardupilot directory in your GIT folder.
Also set verbose for both compile and upload
And DO NOT check for updates on start-up… (Remember, this is a special version just for ArduPilot.)
Click OK and close Arduino
Step 6 Connect your APM to your USB
Then click the “Tools” tab and select “Arduino Mega 2560 or Mega ADK” from the “Board” tab.
Next select the “Tools” tab again, and set the “Serial Port” to the one your APM is connected to.
In my case it was COM4, but check under device manager / Ports to find out on your system.
Step 7 Configure Arducopter.
Click on the APM_Config.h file tab.
Set your frame type (e.g. #define FRAME_CONFIG HEXA_FRAME) in order to get the right image for your frame
Enable or disable the features you wish in this file.
Ie if you want to compile with auto tune disabled, simply un-comment the line
//# AUTOTUNE DISABLED // disable the auto tune functionality to save 7k of flash
Change it to:
# AUTOTUNE DISABLED // disable the auto tune functionality to save 7k of flash
To Disable Auto Tune which is enabled by default.
The commented out options are the NON-default and all that needs to be done is to un-comment them to use them instead.
Save this file and select the file Arducopter.
At this point you are ready to compile.
I would choose Verify for the first attempt.
Step 8 Upload to your ArduPilot.
Then if all is well
This may take a while…
You should end up with…
Configure Your ArduPilot using planner, as normal.
Updating your code
Please ensure that the version of code on your PC is the latest version, use git to update your code to the latest code.
Questions about this page? Comments? Suggestions? Post to APM Forum! Use the platform specific to your query, and make sure to include the name of the page you are referring to.