Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
149 lines (113 sloc) 6.75 KB

PX4

This document describes the build and execution procedure for PX4 flight software on the Snapdragon Flight platform using drivers provided by Qualcomm.

  1. Prerequisites
  2. Building with upstream drivers
  3. Building with FC_ADDON drivers
  4. Host Setup
  5. Building the Code
  6. Installation on Target
  7. Execution
  8. Known Issues and Limitations
  9. More Information

Prerequisites

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.

Building with upstream drivers

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.

Building with FC_ADDON drivers

The following hardware is supported / tested by this configuration:

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.

Host Setup

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.

Building the Code

The commands below build the targets for the DSP and the Linux side. Both executables communicate via muORB.

cd Firmware
make eagle_legacy_default

Installation on Target

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>

Execution

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

Known Issues and Limitations

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

More Information