Tutorials

Firmware flashingUpdated 2026-07-06

Flash firmware with STM32CubeProgrammer

Use ST's official STM32CubeProgrammer to write a FlyingRC .hex firmware file over the STM32 USB bootloader / DFU interface.

Use case

FlyingRC flight controller users who need to recover, replace, or update STM32-based firmware from a local file.

Before you start

  • A FlyingRC STM32-based board and its matching firmware file from the Downloads page.
  • ST STM32CubeProgrammer installed on your computer.
  • A known-good USB data cable. Charge-only cables will not expose the bootloader.
  • Propellers removed and external power disconnected unless the product manual explicitly requires it.

Safety checks

  • Match the firmware target to the exact board model and hardware revision before writing. A wrong target can leave the board unable to boot normally.
  • Follow the product manual if its BOOT / DFU entry method differs from this general workflow.
  • Do not connect motors, propellers, or live payload wiring while testing firmware recovery.

Steps

  1. Download the correct firmware

    Open the FlyingRC Downloads page, choose your exact product, and download the .hex firmware that matches the listed firmware target and board revision. Keep the checksum file nearby when available.

  2. Prepare the board safely

    Remove propellers, disconnect battery power, unplug unnecessary peripherals, and use only USB unless the product manual says otherwise.

  3. Enter the STM32 bootloader / DFU mode

    Hold the board BOOT button or BOOT pads as described in the product manual, then plug in USB. The board should enumerate as an STM32 bootloader / DFU device.

  4. Connect in STM32CubeProgrammer

    Open STM32CubeProgrammer, choose the USB connection mode, select the detected DFU device, then click Connect. If no USB device appears, re-enter bootloader mode and try another USB cable or port.

  5. Load and program the .hex file

    Open the Erasing & Programming view, select the downloaded .hex file, keep verification enabled, then start programming. Do not unplug USB until STM32CubeProgrammer reports success.

  6. Reboot and confirm normal firmware startup

    Disconnect from STM32CubeProgrammer, unplug USB, then reconnect normally without holding BOOT. Open the matching configurator or ground-station software and verify that the firmware connects.

Troubleshooting

STM32CubeProgrammer does not show a USB device

Use a data cable, try another USB port, hold BOOT before plugging in USB, and check whether the product manual requires a specific bootloader entry method.

Programming starts but fails

Reconnect in DFU mode, enable verification, avoid USB hubs, and confirm the file is a complete FlyingRC .hex firmware file rather than a compressed package.

The board still starts old firmware

Confirm the programming operation completed successfully, then power-cycle the board without holding BOOT. If needed, repeat the write with the correct .hex file selected.

Configurator cannot connect after flashing

Use the configurator that matches the firmware family, check the expected USB serial device, and verify that the board was flashed with the correct target.

Related links