Link Search Menu Expand Document

Flight Core v2 Firmware

Table of contents

  1. PX4 Board Support
  2. Tools for Flashing
  3. Bootloader
    1. How to Build PX4 Bootloader
    2. How to Flash PX4 Bootloader with ST32CubeProgrammer
  4. How to Build PX4 Application
    1. How to Flash PX4 Bootloader with ST32CubeProgrammer

PX4 Board Support

PX4 mainline Board Support is available at boards/modalai/fc-v2.

Tools for Flashing

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

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 https://github.com/PX4/PX4-Autopilot --recursive
cd PX4-Autopilot
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

How to Build PX4 Application

git clone https://github.com/PX4/PX4-Autopilot --recursive
cd PX4-Autopilot
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