PX4 FMU-v6C Quadcopter Firmware: Complete Build & Flash Guide (2026)

PX4 FMU-v6C Quadcopter Firmware: Complete Build & Flash Guide

Target Hardware: PX4 FMUv6C Flight Controller (STM32H7, Cortex-M7)
Vehicle Type: Quadcopter X / + Frame
PX4 Version: v1.x / main


Key Takeaways

  • PX4 FMU-v6C firmware compilation is tested on Ubuntu 22.04 with the official arm-none-eabi GCC toolchain ≥ 10.3.0
  • Five onboard configuration variants are available: default, raptor, neural, rover, and bootloader — choose default for general quadcopter use
  • Four independent flashing methods exist: make upload, QGroundControl, SD card, and STM32 DFU mode
  • Post-flash calibration of sensors, radio, and ESCs is required before first flight; DShot protocol eliminates the need for manual ESC calibration
  • If your firmware exceeds the 1.9 MB flash limit, remove unnecessary modules or switch to a leaner configuration variant

1. Environment Setup

1.1 Linux (Ubuntu 20.04 / 22.04) — Recommended

# Install dependencies
sudo apt update
sudo apt install git zip cmake build-essential genromfs ninja-build exiftool \
  python3-pip python3-tk python3-dev python3-opencv python3-venv \
  g++-arm-linux-gnueabihf

# Install arm-none-eabi toolchain (required for NuttX firmware compilation)
sudo apt install gcc-arm-none-eabi

# Verify installation
arm-none-eabi-gcc --version
# Output should be ≥ 10.3.0

Note: PX4 officially recommends Ubuntu 22.04 with the official arm-none-eabi toolchain. If the system package version is too low, download from ARM’s website:

wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
tar xf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
export PATH=$PATH:/path/to/arm-gnu-toolchain/bin

1.2 Windows (WSL2) — Recommended

On Windows, use WSL2 (Ubuntu 22.04) for compilation:

# PowerShell (Admin)
wsl --install -d Ubuntu-22.04

Then follow the Linux steps above inside WSL2 Ubuntu.

Native Windows (not recommended): MSYS2 or Cygwin are possible but receive limited official support and produce slower builds.

1.3 macOS

# Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install toolchain
brew tap PX4/px4
brew install px4-dev
brew install gcc-arm-none-eabi

2. Getting the Source Code

git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot

--recursive is required — it pulls all submodules (NuttX, UAVCAN, etc.) in a single step.

If you cloned without --recursive:

git submodule update --init --recursive

3. Firmware Configuration

3.1 FMU-v6C Configuration Variants

FMU-v6C provides multiple .px4board configuration variants:

Board Config Use Case Characteristics
default.px4board Standard firmware (Recommended) Full-featured multirotor/fixed-wing/VTOL
raptor.px4board Raptor racing quadcopter Enables mc_raptor module, disables fixed-wing modules
neural.px4board Neural network controlled quadcopter Enables mc_nn_control + gyro_fft
rover.px4board Unmanned ground vehicle Uses rover control modules
bootloader.px4board Bootloader only Compiles the bootloader binary only

Quadcopter users should use default (or raptor if building a racing drone).

3.2 default.px4board Key Configuration

Architecture:  cortex-m7 (STM32H7)
Toolchain:     arm-none-eabi
GPS Ports:     /dev/ttyS0 (GPS1), /dev/ttyS6 (GPS2)
Telemetry:     /dev/ttyS5 (TEL1), /dev/ttyS3 (TEL2), /dev/ttyS1 (TEL3)
PWM Channels:  8 direct outputs
PX4IO:         Enabled (v2 co-processor)
DShot:         Enabled
UAVCAN:        Enabled
Firmware cap:  ~1.9 MB (1966080 bytes)

3.3 Quadcopter Airframe Options

Select the airframe after flashing via QGC or parameters:

ID Name Type Description
4001 Generic Quadcopter Quadrotor x General X-frame quadcopter
5001 Generic Quadcopter Quadrotor + General +-frame quadcopter
4014 S500 Generic Quadrotor x S500 X-frame
4015 Holybro S500 Quadrotor x Holybro S500 kit
4019 X500 v2 Quadrotor x Holybro X500 v2
4050 Generic 250 Racer Quadrotor x 250 racing frame
4052 Holybro QAV250 Quadrotor x QAV250 frame

4. Compiling the Firmware

4.1 Build Standard Firmware (Recommended)

cd PX4-Autopilot

# Compile FMU-v6C default firmware
make px4_fmu-v6c_default

Build output goes to build/px4_fmu-v6c_default/:

  • px4_fmu-v6c_default.elf — ELF format (for debugging)
  • px4_fmu-v6c_default.bin — Binary format (for flashing)
  • px4_fmu-v6c_default.px4 — PX4 firmware package (for QGC upload)

4.2 Build Raptor Variant (Racing)

make px4_fmu-v6c_raptor

4.3 Build Neural Variant (Neural Network Control)

make px4_fmu-v6c_neural

4.4 Enable Ninja Build (Recommended for Speed)

If Ninja is installed, PX4 uses it automatically for significantly faster builds:

sudo apt install ninja-build
# PX4 will auto-detect and use Ninja on subsequent builds

4.5 Multi-Threaded Compilation

make px4_fmu-v6c_default -j$(nproc)

-j$(nproc) sets parallel jobs equal to your CPU core count.

4.6 Build Individual Modules (Development)

# Enter build directory, build only a specific driver/module
cd build/px4_fmu-v6c_default
make modules__mc_pos_control    # Compile only the position control module

5. Flashing the Firmware

5.1 Method 1: make upload (Recommended for Development)

Connect the flight controller via USB, then:

make px4_fmu-v6c_default upload

This command automatically:

  1. Finds the connected PX4 device
  2. Communicates with the bootloader via USB (ttyACM)
  3. Writes the firmware to Flash

Tip: Enter Bootloader mode before flashing:

  • Hold the BOOT button (or SAFETY button) on the flight controller
  • Connect USB to power on
  • Or press RESET after USB connection

5.2 Method 2: QGroundControl (Recommended for End Users)

  1. Copy the generated .px4 file to your computer
  2. Open QGroundControl
  3. Navigate to Vehicle Setup → Firmware
  4. Connect the flight controller via USB
  5. Click “Advanced Settings” and select the local firmware file
  6. Choose build/px4_fmu-v6c_default/px4_fmu-v6c_default.px4
  7. Click “Update Firmware”

Or generate QGC-compatible firmware directly from the command line:

make px4_fmu-v6c_default qgc_firmware

5.3 Method 3: SD Card Update

  1. Copy px4_fmu-v6c_default.bin to the root directory of a microSD card
  2. Rename to firmware.bin
  3. Insert the SD card into the flight controller
  4. Power cycle — the bootloader auto-detects and updates

5.4 Method 4: STM32 DFU Mode

If the bootloader is corrupted or direct flashing is required:

# Install dfu-util
sudo apt install dfu-util

# Enter DFU mode (short BOOT0 to VDD, then power on)
dfu-util -a 0 -s 0x08020000:leave -D build/px4_fmu-v6c_default/px4_fmu-v6c_default.bin

FMU-v6C application start address is 0x08020000 (see hw_config.h).

5.5 Flashing the Bootloader

If you need to update the bootloader:

make px4_fmu-v6c_bootloader upload

The bootloader binary is also located at boards/px4/fmu-v6c/extras/px4_fmu-v6c_bootloader.bin.


6. First Power-On Configuration

6.1 Select the Airframe

After flashing, connect via USB to QGroundControl:

  1. Open QGC → Vehicle Setup → Airframe
  2. Select a quadcopter type, e.g.:
    • Generic X-frame quadcopter → Generic Quadrotor X (4001)
    • Holybro S500 → S500 Generic (4014)
  3. Click “Apply and Restart”

6.2 Sensor Calibration

In QGC Vehicle Setup → Sensors, calibrate in order:

Step Operation
Gyroscope Place the flight controller stationary, click “Calibrate”
Accelerometer Rotate the controller through 6 orientations
Magnetometer Rotate 360° (if GPS/compass module is installed)
Level Horizon Place the controller level, click “Calibrate”

6.3 Radio Calibration

  1. Bind the radio receiver
  2. In QGC Vehicle Setup → Radio
  3. Verify the receiver is connected and outputting PPM/SBUS
  4. Click “Calibrate” and follow the stick movement prompts

6.4 ESC Calibration

If using PWM ESCs (non-DShot):

  1. Remove propellers
  2. In QGC, go to Vehicle Setup → Motors
  3. Click “Calibrate ESCs” and follow the prompts

DShot users (recommended): No ESC calibration needed — just set the DSHOT_CONFIG parameter.

6.5 Key Parameter Check

Parameter Description Quadcopter Recommended Value
MAV_TYPE Vehicle type 2 (Quadcopter)
CA_ROTOR_COUNT Number of motors 4
CA_ROTOR0_PX/PY Motor 1 position 1/1 (X-frame)
DSHOT_CONFIG DShot protocol 0=Disabled, 300/600/1200
SYS_AUTOSTART Airframe ID 4001 (Generic X-type)
BAT1_V_DIV Voltage divider ratio 18.1 (FMU-v6C default)
BAT1_A_PER_V Current sensitivity 36.37 (FMU-v6C default)

7. Frequently Asked Questions

7.1 Build Error: “YOU HAVE TO USE GIT”

YOU HAVE TO USE GIT TO DOWNLOAD THIS REPOSITORY. ABORTING.

Cause: Source code was not obtained via git clone (e.g., downloaded as a zip archive).

Solution: Use git clone --recursive, or initialize git in the source root:

git init
git remote add origin https://github.com/PX4/PX4-Autopilot.git
git fetch
git checkout -f main
git submodule update --init --recursive

7.2 Compiler Not Found: “arm-none-eabi-gcc”

/usr/bin/env: 'arm-none-eabi-gcc': No such file or directory

Solution: Install the ARM cross-compilation toolchain:

sudo apt install gcc-arm-none-eabi
# Or download the latest version from the ARM website

7.3 Flashing Error: No Device Found

Error: No PX4 Bootloader device found

Solutions:

  1. Flight controller not in bootloader mode → Hold BOOT button, then power on via USB
  2. USB driver issue → Linux: check lsusb; Windows: verify drivers (WinUSB or libusb required)
  3. WSL2 USB passthrough → Configure USB/IP (usbipd-win) in WSL2

7.4 Build Output File Guide

build/px4_fmu-v6c_default/
├── px4_fmu-v6c_default.bin      # Raw binary (SD card upgrade)
├── px4_fmu-v6c_default.elf      # ELF debug file (GDB)
├── px4_fmu-v6c_default.px4      # PX4 firmware package (QGC upgrade)
├── px4_fmu-v6c_default          # Another ELF copy
├── firmware.prototype           # Firmware metadata (JSON)
├── nuttx/                       # NuttX OS build artifacts
└── CMakeCache.txt               # CMake cache

7.5 Firmware Oversize Error

region `flash' overflowed by XXXX bytes

Solutions:

  1. Remove unnecessary modules: edit default.px4board and set unused modules to =n
  2. Switch to a leaner config like raptor.px4board
  3. Check image_maxsize: 1966080 (~1.9 MB) in firmware.prototype

7.6 FMU-v6C Hardware Revision Guide

HW ID Description Features
V6C00 FMUv6C Rev 0 I2C4 external with internal devices
V6C01 FMUv6C Rev 1 I2C4 internal, I2C2 external
V6C02 FMUv6C Rev 2 I2C4 internal, BMI088+ICM42688P
V6C10 No PX4IO Rev 0 Without co-processor version
V6C11 No PX4IO Rev 1 Without co-processor version
V6C21 FMUv6C Mini Rev 1 Mini version
V6C22 FMUv6C Mini Rev 2 Mini version, BMI088+ICM42688P

Reference Links

  • PX4 Developer Guide
  • PX4 Build Guide
  • FMU-v6C Hardware Documentation
  • QGroundControl Download
  • ARM GNU Toolchain

If you have questions about the PX4 FMU-v6C firmware build process or flight controller setup, feel free to contact Aomway at [email protected] — we work extensively with PX4-based autopilots and custom UAV integrations.

Document Info
Based on: PX4-Autopilot main branch
Target Hardware: PX4 FMUv6C (STM32H743IIK6)

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top