Link Search Menu Expand Document

VOXL 2 PX4 Developer and Build Guide

Introduction

Since not all support for QRB5165 has been integrated into the mainline PX4 source code ModalAI maintains a fork of the project where our custom additions are kept. The intention is to eventually merge all of these customizations into the mainline PX4 source repository so that our fork will no longer be necessary other than for research and development purposes.

Main components

  • The PX4 firmware lives in a fork of the main PX4 firmware repository
  • The voxl-px4 project is a wrapper that includes the PX4 firmware as a git submodule. The main objectives are to provide packaging and installation support.
  • The build environment for QRB5165 is encapsulated in a docker image. This docker includes an ARM64 toolchain from Linaro to build the code running on the applications processor and a Hexagon DSP toolchain to build the code running on the SDSP. The Hexagon SDK is only available directly from Qualcomm so instructions are provided to obtain the SDK and integrate it into the build environment docker image.

I2C debugging

i2cdetect

There are three external i2c buses available to the SLPI DSP (SDSP). In order to help troubleshoot devices attached to these buses the PX4 i2cdetect system command has been added to the build (As of v1.14.0-2.0.135). With this it is possible to scan each of the external buses to detect devices attached.

  • Make sure px4 isn’t running.
    • systemctl disable voxl-px4
  • Then power cycle the board.
  • Start px4 from the command line in minimal mode
    • MINIMAL_PX4=1 voxl-px4 -d
  • At the px4 prompt enter the command
    • qshell i2cdetect -b 1
    • qshell i2cdetect -b 2
    • qshell i2cdetect -b 4

VOXL 2 external i2c buses

  • bus 1: “Magnetometer” i2c on J19, pins 4 and 5
  • bus 2: i2c on J4
  • bus 4: “Spare” i2c on J19, pins 7 and 8

DSP debugging

mini-dm

mini-dm is a diag log tool for debugging the shell output of the Hexagon DSP. mini-dm is a part of the Hexagon SDK.

To configure on Ubuntu:

lsusb and find the Qualcomm entry.

VOXL’s device ID is 05c6:901d Qualcomm, Inc.

Add the udev rule with the following command:

echo 'SUBSYSTEM=="usb",ATTRS{idVendor}=="05c6",ATTRS{idProduct}=="901d",MODE=="0666"' | sudo tee -a /etc/udev/rules.d/70-android.rules

Then reload udev rules or power cycle the voxl

voxl2:/$ udevadm control --reload-rules && sudo udevadm trigger

To execute mini-dm extract the dsp sdk and run on host machine:

sdk/x.x.x/tools/debug/mini-dm/UbuntuXX/mini-dm

mini-dm Ubuntu18 has been verified to work on Ubuntu24

Then on voxl run px4 dsp commands such as:

voxl2:/$ px4-qshell crsf_rc status

The output will show up in the mini-dm console

[08500/01]  51:17.578  0068:01: SDSP: [uORB] Marking DeviceNode(qshell_req) as advertised in process_remote_topic  0632  uORBManager.cpp
[08500/01]  51:17.580  0049:01: SDSP: [qshell] qshell gotten: crsf_rc status  0088  qshell.cpp
[08500/01]  51:17.580  0049:01: SDSP: [qshell]   arg0 = 'crsf_rc'  0163  qshell.cpp
[08500/01]  51:17.580  0049:01: SDSP: [qshell]   arg1 = 'status'  0163  qshell.cpp
[08500/01]  51:17.580  0049:01: SDSP: [crsf_rc] UART device: 7  0582  CrsfRc.cpp
[08500/01]  51:17.580  0049:01: SDSP: [crsf_rc] UART RX bytes: 43316  0583  CrsfRc.cpp
...