ArduPilot Build – Simplified Documentation

By

in

, ,

Posted

Tags:

Updated

Reproducibility: Using a Docker container to produce this build.

  • Container:
    • docker run --rm -it -v ./ardu-build:/builds python:3.11-alpine sh -c “cd /builds && sh”
    • (can also use alpine, but have to run the Python install script below to avoid Python 3.12)
  • Dependencies:
    • apk add nano htop openssh git curl wget gcc g++ make zlib-dev libffi-dev openssl-dev musl-dev gcc-arm-none-eabi g++-arm-none-eabi
  • NOTE: Python – Alpine’s Python Distribution can vary, and Python 3.12+ breaks build tool (missing imp library), if you want to use just the alpine image, run the below, otherwise, you can just skip the below
    • cd /opt && wget https://www.python.org/ftp/python/3.11/Python-3.11.tgz && tar xzf Python-3.11.tgz && cd Python-3.11 && ./configure --prefix=/usr --enable-optimizations --enable-loadable-sqlite-extensions --with-ensurepip=install && make install
  • PIP Dependencies
    • python -m pip uninstall empy && python -m pip install empy==3.3.4 pexpect future serial
  • Architecture: x86_64 and ARM
  • Repo:
    • git clone --recursive https://github.com/jasoryeh/ardupilot.git && cd ardupilot

Then, setup the build. Main Build Tool: ./waf

  1. Identify board to build for, use ./waf list_boards
    • Using MatekF405-TE for examples
  2. Configure the build: ./waf configure <board>
    • ./waf configure --board matekf405-te
  3. Build for copter
    • ./waf copter

TL;DR
$ docker run --rm -it -v ./ardu-build:/builds python:3.11-alpine sh -c "cd /builds && sh"
$ apk add nano htop openssh git curl wget gcc g++ make zlib-dev libffi-dev openssl-dev musl-dev gcc-arm-none-eabi g++-arm-none-eabi
$ python -m pip uninstall empy && python -m pip install empy==3.3.4 pexpect future serial
$ git clone --recursive https://github.com/jasoryeh/ardupilot.git && cd ardupilot
$ ./waf configure --board matekf405-te
$ ./waf copter

TL;DR 2 – w/ OpenDroneID and ADSB (required by ODID)

$ docker run --rm -it -v ./ardu-build:/builds python:3.11-alpine sh -c "cd /builds && sh"
$ apk add nano htop openssh git curl wget gcc g++ make zlib-dev libffi-dev openssl-dev musl-dev gcc-arm-none-eabi g++-arm-none-eabi
$ python -m pip uninstall empy && python -m pip install empy==3.3.4 pexpect future serial
$ git clone --recursive https://github.com/jasoryeh/ardupilot.git && cd ardupilot
$ ./waf configure --board matekf405-te --enable-OpenDroneID --enable-ADSB
$ ./waf copter

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *