Link Search Menu Expand Document

Flight Core v2 Firmware

Table of contents

  1. Release Notes
  2. General User Guide
    1. QGroundControl FW Update Not Working
    2. How to Upgrade using px_uploader Tool
  3. Developer Guide
    1. v1.13.2 PX4 Support
    2. Mainline Support
    3. Tools for Flashing
    4. How to Build PX4 Application
      1. How to Flash PX4 Bootloader with ST32CubeProgrammer
    5. Bootloader
      1. How to Build PX4 Bootloader
      2. How to Flash PX4 Bootloader with ST32CubeProgrammer

Release Notes

VersionTypeChange DescriptionCommitStatus
v1.13.2-0.1.1ModalAI Enhancement- Initial release on top of v1.13.2 from PX4 mainlineTagReleased

General User Guide

QGroundControl FW Update Not Working

The feature in QGroundControl to update the Flight Core v2 is currently buggy/broken.

To update the firmware, please use the px_uploader tool.

This has been tested on OSX 13.1 and Ubuntu 18.04 with success to update firmware over USB.

How to Upgrade using px_uploader Tool

  • Ensure you have Python 3 and pyserial module installed
  • Follow build guide below, or download the firmware from links above in release notes (e.g. modalai_fc-v2_default.px4)
  • Obtain the PX4 open source community tool (not a ModalAI tool):
git clone -b modalai-1.13.2 https://github.com/modalai/px4-firmware.git --recursive
cd px4-firmware
  • Exit QGC if running
  • Disconnect Flight Core v2 from USB
  • Run the following (note: your USB device name may be different and your path may be different)
./Tools/px_uploader.py --port /dev/cu.usbmodem01 modalai_fc-v2_default.px4 --baud-bootloader 1152000
  • Connect Flight Core v2 over USB (note, no external power needed)
  • Flight Core v2 boots into bootloader mode
  • The update should begin the update

Developer Guide

v1.13.2 PX4 Support

ModalAI makes some mods to mainline and maintains a branch here that is shipped on the product by default.

Mainline Support

Tools for Flashing

Recommended hardware: similar to STLink v2 or equivalent. Please install STM32CubeProgrammer to get the STM32_Programmer_CLI binary.

How to Build PX4 Application

git clone -b modalai-1.13.2 https://github.com/modalai/px4-firmware.git --recursive
cd px4-firmware
make modalai_fc-v2

After building, the bootloader binary is located at:

build/modalai_fc-v2_default/modalai_fc-v2_default.bin

How to Flash PX4 Bootloader with ST32CubeProgrammer

The application is flashed at 0x08020000:

echo "programming application..."
STM32_Programmer_CLI -c port=SWD -w modalai_fc-v2_default.bin 0x08020000 -v

Bootloader

The bootloader is flashed at the factor and generally you do not need to build or flash it. But, if you want to customize the bootloader, the following can be used.

How to Build PX4 Bootloader

git clone -b modalai-1.13.2 https://github.com/modalai/px4-firmware.git --recursive
cd px4-firmware
make modalai_fc-v2_bootloader

After building, the bootloader binary is located at:

build/modalai_fc-v2_bootloader/modalai_fc-v2_bootloader.bin

How to Flash PX4 Bootloader with ST32CubeProgrammer

The bootloader is flashed at 0x08000000:

echo "erasing..."
STM32_Programmer_CLI -c port=SWD -e all

echo "programming bootloader..."
STM32_Programmer_CLI -c port=SWD -w modalai_fc-v2_bootloader.bin 0x08000000 -v