Skip to content

Install the software.

PX4 Software installation and build


The software version we are using for the current drone is based on release 1.11.2. You can clone the repo here.

Make sure to update your system before.

$ sudo apt-get update && upgrade

Install ninja build:

$ sudo apt-get install -y ninja-build

In the folder of preference, run the following :

$ git clone https://github.com/alsarm/PX4-Autopilot.git

Navigate inside the repo into the 'Tools' folder:

$ cd PX4-Autopilot/Tools/setup

Execute the 'ubuntu.sh' script, this will take some minutes to complete:

$ ./ubuntu.sh

If installation fails, you may need to check the Ubuntu Software tab in Software & Updates to verify that you have Community-maintained source checked.

To compile the software, you will need to have an ARM GNU compiler version <9.3.1. Version 7.3.1 works pretty well. The setup script from previous step will install the compiler at

~/opt/gcc-arm-none-eabi-9-2020-q2-update

The easiest way to use version 7.3.1 is to download the corresponding files from here. Uncompress the .tar file and move it to '~/opt/' , then change the name of the folder to 'gcc-arm-none-eabi-9-2020-q2-update' (just remember to back up the previous folder). Other methods to setup the compiler could be through symbolic links.

Once the script finishes, you can check everything works by compiling the software. But before, you need to change to the 'release/1.11' branch:

~PX4-Autopilot$git checkout release/1.11
Branch 'release/1.11' set up to track remote branch 'release/1.11' from 'origin'.
Switched to a new branch 'release/1.11'

~PX4-Autopilot$make px4_fmu-v5_default

Alternatively you can directly upload to the PX4 by adding the option 'upload'

~PX4-Autopilot$make px4_fmu-v5_default upload

If you are prompted regarding some files not being in the recommended version, type 'y' and continue with the build.


QGroundControl Install

To install QGroundControl, please refer to the very comprehensive guide provided by them


Debugging FMU

It may be useful to debug the PX4 via the NSH terminal. For that reason, you can use a FTDI cable to connect to the debug port, as described here.

You can check how to connect the FTDI cable to the PX4 here.