This document describes the build and execution procedure for PX4 flight software on the Snapdragon Flight platform using drivers provided by Qualcomm.
- Prerequisites
- Building with upstream drivers
- Building with FC_ADDON drivers
- Host Setup
- Building the Code
- Installation on Target
- Execution
- Known Issues and Limitations
- More Information
To build the PX4 flight stack for Snapdragon Flight, you need to set up the build environment as described in GettingStarted. You can optionally build and run HelloWorld to test your setup.
This configuration is supported by the PX4 community. For more information on the hardware components required, please see http://dev.px4.io.
To build code for this configuration, please SKIP the rest of this page and follow the instructions in the official PX4 documentation at http://dev.px4.io/starting-building.html.
The following hardware is supported / tested by this configuration:
- Snapdragon Flight or Developer's Edition
- Qualcomm ESC board
- Spektrum DSM RC Receiver (such as AT6210), and a Compatible Radio
- MicroHeli 200mm quadcopter airframe (other airframes may work too)
This configuration uses proprietary UART_ESC and RC Receiver drivers that are provided by the Flight Controller AddOn (FC_ADDON). The upstream PX4 project contains wrappers for these drivers for use by PX4.
Login to the Intrinsyc support website and download the latest Flight Controller AddOn. The Flight Controller AddOn for Snapdragon Flight provides some driver binaries that require wrappers for use with PX4. This repository contains these driver wrappers.
Following these instructions to build the PX4 flight code for Snapdragon Flight using the driver binaries provided by Qualcomm.
Follow the instructions here to install the tools, setup the environment variables.
Obtain the Flight Controller AddOn file (*_qcom_flight_controller_*.zip). The latest version is available from the Intrinsyc support website. Download and extract it to any location on your linux PC. The environment variable FC_ADDON needs to point to the location of the extracted Snapdragon Flight Controller addon.
To use these with PX4, do the following:
git clone https://github.com/PX4/Firmware
cd Firmware
git checkout tags/v1.7.3
git submodule update --init --recursive
export FC_ADDON=<location-of-extracted-flight-controller-addon>
NOTE:
- The above git tag is compatible/was tested with platform software version 3.1.3.1 and flight controller addon version 3.1.3.1 available from Intrinsyc here. Follow the instructions therein to complete the installation.
- Later releases at https://github.com/PX4/Firmware/releases MAY work too but have not been tested.
The commands below build the targets for the DSP and the Linux side. Both executables communicate via muORB.
cd Firmware
make eagle_legacy_default
To load the software on the device, make sure the device is booted up, and verify that you can connect to it via USB cable or SSH.
The PX4 software uses configuration files that need to be copied on target. They are located in the following path:
Firmware/posix-configs/eagle/<sub-directory>
Where refers to the platform or use-case such as:
- hil: Configuration files for hardware-in-the-loop (HIL) simulation
- flight: Configuration files for a generic flight platform
- 200qx: Configuration files customized for the Microheli 200 MM flight platform
Install the configuration files:
cd Firmware
adb push ./posix-configs/eagle/200qx/px4.config /usr/share/data/adsp/px4.config
adb push ./posix-configs/eagle/200qx/mainapp.config /home/linaro/mainapp.config
NOTE: The steps above installed the flight config files for the 200mm flight platform. Please modify the source path and file names based on your platform or use-case.
Install the PX4 binaries:
cd Firmware
adb push ./build/posix_eagle_legacy/px4 /home/linaro
adb push ./build/qurt_eagle_legacy/platforms/qurt/libpx4.so /usr/share/data/adsp
adb push ./build/qurt_eagle_legacy/platforms/qurt/libpx4muorb_skel.so /usr/share/data/adsp
If not already done, install the aDSP static image and drivers from the Flight Controller AddOn by executing the install script provided in the addon:
installfcaddon.sh <from Linux>
<or>
installfcaddon.bat <from Windows>
Connect to the target via SSH (recommended) or ADB.
Optionally, remove the following files (that may have been created from a previous run)
sudo su
cd /home/linaro
rm -rf log
rm -rf dataman
rm -rf rootfs
Start the PX4 flight software as follows:
sudo su
cd /home/linaro
chmod a+x px4
./px4 mainapp.config
To stop the flight stack and exit gracefully, run the following commands in the mainapp shell:
muorb stop
shutdown
NOTE: This section is applicable to the latest stable release only.
Only the following modes / configurations / tools have been tested and therefore supported:
- Flight modes
- MANUAL (Angle) mode
- ATLCTL mode
- Quadcopter X airframes
The following are not functional:
- HITL / HIL mode
- Running the DSP debug monitor (mini-dm logging tool): https://dev.px4.io/en/debug/system_console.html
- Setting up auto-start of mainapp upon boot up: https://dev.px4.io/en/setup/building_px4.html#qurt--snapdragon-based-boards
- Troubleshooting: https://docs.px4.io/en/flight_controller/snapdragon_flight_advanced.html
- PX4 User Guide: https://docs.px4.io/en
- PX4 Developer Guide: https://dev.px4.io/en