ArduPilot uses Waf as its build system. A thin wrapper script at the repository root (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Ardupilot/ardupilot/llms.txt
Use this file to discover all available pages before exploring further.
./waf) delegates to the real Waf binary maintained as a Git submodule in modules/waf/. All build commands must be run from the repository root — never from a subdirectory — and must never be run as root. Configuration is performed once per target board; subsequent builds skip configuration and only recompile changed files, making incremental builds fast.
Listing available boards
Before configuring, you can see every supported board by running:--board name passed to configure must exactly match one of the names returned by list_boards.
Configuring and building
Theconfigure step records your chosen board and any extra options. You only need to re-run it when switching boards or changing a configuration flag. All subsequent ./waf <target> calls use the saved configuration.
build/<board-name>/bin/. For example, after building for CubeBlack, the ArduCopter binary appears at build/CubeBlack/bin/arducopter.
Vehicle build targets
Each vehicle type is a named group in Waf. Building a group compiles all binaries that belong to it:Program groups
Waf organizes all build targets into program groups. The default group built when you run./waf with no arguments is bin:
| Group | Contents |
|---|---|
bin | Main vehicle binaries — ArduPilot’s primary products |
tools | Supporting tools |
examples | Library usage examples and standalone tests |
tests | C++ unit tests (GTest-based) |
Building specific targets
To build a single binary instead of an entire group, use--targets with the path relative to build/<board>/:
Uploading to hardware
Build commands accept a--upload flag that flashes the compiled binary to a connected board over USB. This is supported for Pixhawk-family boards and Linux-based boards:
--upload on Linux boards uses rsync to copy the binary to the configured destination.
Cleaning the build
Two levels of cleaning are available:master), use submodulesync:
Docker builds
A Docker environment is provided for building in a clean, isolated environment without modifying the host system. Build the image once:docker run: