-
proficnc authored
Updated build instruction link to the one on the Dev.Ardupilot wiki
b1bd708a
ArduPilot Project
You can find lots of development information at the ArduPilot development site
To compile APM2.x Ardupilot after version 3.1 please follow the instructions found at
[Dev.Ardupilot] (http://dev.ardupilot.com/wiki/building-ardupilot-with-arduino-windows/)
Getting the source
You can either download the source using the "ZIP" button at the top of the github page, or you can make a clone using git:
git clone git://github.com/diydrones/ardupilot.git
Prerequisites
Ubuntu Linux
The following packages are required to build ardupilot for the
APM1/APM2 (Arduino) platform in Ubuntu: gawk make git arduino-core g++
To build ardupilot for the PX4 platform, you'll first need to install the PX4 toolchain and download the PX4 source code. See the PX4 toolchain installation page.
The easiest way to install all these prerequisites is to run the
ardupilot/Tools/scripts/install-prereqs-ubuntu.sh
script, which will
install all the required packages and download all the required
software.
Building using the Arduino IDE
ArduPilot is no longer compatible with the standard Arduino distribution. You need to use a patched Arduino IDE to build ArduPilot.
Do not try to use the Arduino IDE to build in Linux--you should follow the instructions in the "Building using make" section.
-
The patched ArduPilot Arduino IDE is available for Mac and Windows from the downloads page.
-
Unpack and launch the ArduPilot Arduino IDE. In the preferences menu, set your sketchbook location to your downloaded or cloned
ardupilot
directory. -
In the ArduPilot Arduino IDE, select your ArduPilot type (APM1 or APM2) from the ArduPilot menu (in the top menubar).
-
Restart the ArduPilot Arduino IDE. You should now be able to build ArduPlane or ArduCopter from source.
-
Remember that, after changing ArduPilot type (APM1 or APM2) in the IDE, you'll need to close and restart the IDE before continuing.
Building using make
-
Before you build the project for the first time, you'll need to run
make configure
from a sketch directory (i.e. ArduPlane, ArduCopter, etc...). This will create aconfig.mk
file at the top level of the repository. You can set some defaults inconfig.mk
-
In the sketch directory, type
make
to build for APM2. Alternatively,make apm1
will build for the APM1 andmake px4
will build for the PX4. The binaries will generated in/tmp/<i>sketchname</i>.build
. -
Type
make upload
to upload. You may need to set the correct default serial port in yourconfig.mk
.
Development using VirtualBox
ardupilot has a standardized Linux virtual machine (VM) setup script that uses the free VirtualBox virtualization software. You can use it to create a standard, reproducible development environment in just a few minutes in Linux, OS X, or Windows.