Basic usage
There are several commands in the build system for advanced usages, but here we list some basic and more used commands as example.
Build ArduCopter
Below shows how to build ArduCopter for the Pixhawk2/Cube. Many other boards are supported and the next section shows how to get a full list of them.
./waf configure --board CubeBlack
./waf copter
The first command should be called only once or when you want to change a configuration option. One configuration often used is the --board option to switch from one board to another one. For example we could switch to SkyViper GPS drone and build again:
./waf configure --board skyviper-v2450
./waf copter
If building for the bebop2 the binary must be built statically:
./waf configure --board bebop --static
./waf copter
The "arducopter" and "arducopter-heli" binaries should appear in the build/<board-name>/bin directory.
List available boards
It's possible to get a list of supported boards on ArduPilot with the command below
./waf list_boards
Here are some commands to configure waf for commonly used boards:
./waf configure --board bebop --static # Bebop or Bebop2
./waf configure --board edge # emlid edge
./waf configure --board fmuv3 # Pixhawk2/Cube using ChibiOS
./waf configure --board fmuv4 # Pixracer using ChibiOS
./waf configure --board navio2 # emlid navio2
./waf configure --board Pixhawk1 # Pixhawk1
./waf configure --board CubeBlack # Pixhawk2
./waf configure --board Pixracer # Pixracer
./waf configure --board skyviper-v2450 # SkyRocket's SkyViper GPS drone using ChibiOS
./waf configure --board sitl # software-in-the-loop simulator
./waf configure --board sitl --debug # software-in-the-loop simulator with debug symbols
Clean the build
Commands clean and distclean can be used to clean the objects produced by the build. The first keeps the configure information, cleaning only the objects for the current board. The second cleans everything for every board, including the saved configure information.
Cleaning the build is very often not necessary and discouraged. We do incremental builds reducing the build time by orders of magnitude.
ardupilot编译不同的板子
最新推荐文章于 2023-07-04 17:18:14 发布