MicoAir
Docs directory
Table of contents

Firmware Flashing Tutorial (ArduPilot/PX4/Betaflight/INAV)

Video tutorial: How to Flash ArduPilot, PX4, INAV, Betaflight, and Other Open-Source Firmware onto an H743 Flight Controller

Tutorial Overview

MicoAir743 flight controller

The MicoAir743 series of MicoAir flight controllers supports the following four open-source flight-control firmware platforms:

  • ArduPilot
  • PX4
  • Betaflight
  • INAV

The four firmware platforms can be changed as needed. Their flashing procedures share some common steps but also differ in several respects. Using MicoAir743 as an example, this guide explains how to flash each of the four firmware platforms. The same procedures also apply to other models, including MicoAir743v2 and MicoAir405v2.

The STM32 DFU mode is permanently stored in ROM and is not lost when application firmware is flashed. Even if the application firmware cannot start, the flight controller can still enter DFU mode and be reflashed.

Required Software Tools

ToolPurpose
Zadig 2.8Install the DFU driver
STM32CubeProgrammerST's official programming tool, used to flash the flight-controller bootloader and firmware
Betaflight ConfiguratorConfigure Betaflight flight controllers and flash firmware
Mission PlannerArduPilot ground station and firmware flashing
QGroundControlPX4 ground station and firmware flashing
INAV ConfiguratorConfigure INAV flight controllers and flash firmware

MicoConfigurator requires no installation: simply open it and start using it. It supports Windows, macOS, and Linux.

It provides online updates, local-file flashing, and DFU flashing, bringing firmware updates together in one place:

  • If the flight controller is already running ArduPilot firmware, use an online update or flash a local file without any additional steps.
  • If the flight controller is not currently running ArduPilot firmware, use DFU flashing. Instructions for installing the DFU driver are provided later in this guide.
  • STM32CubeProgrammer does not need to be installed when using DFU flashing.

MicoConfigurator firmware update interface

MicoConfigurator DFU flashing interface

Firmware Downloads

The MicoAir repositories provide only older firmware versions. Download the latest versions from the corresponding open-source flight-control project's official website, or flash them online through the flight-controller configuration software.

Flight controller modelFirmware repository
MicoAir743MicoAir743 Firmware
MicoAir743v2, MicoAir743v2-AIOMicoAir743v2 Firmware
MicoAir405v2MicoAir405v2 Firmware
MicoAir405MiniMicoAir405Mini Firmware

Official ArduPilot Firmware

ArduPilot officially supports MicoAir405v2 starting with version 4.5.0, and MicoAir405Mini, MicoAir743, and MicoAir743v2 starting with version 4.6.0. Firmware for the corresponding models can be downloaded from the official ArduPilot server:

ArduPilot Firmware Download

Official ArduPilot firmware download page

Older firmware versions can be downloaded from the MicoAir GitHub repositories or QQ groups. See the corresponding flight-controller manual for details.

To select firmware features according to your own requirements, you can also use ArduPilot's online custom firmware service. Select the required features online, generate the firmware, and download it locally:

ArduPilot Custom Firmware Builder

ArduPilot online custom firmware page

Enter DFU Mode and Install the Driver

Prepare a MicoAir743 flight controller and a USB Type-C cable that supports data transfer.

1. Put the Flight Controller into DFU Mode

  1. Press and hold the BOOT button next to the flight controller's USB port.
  2. Keep the button pressed while plugging in the USB cable and connecting it to the computer.
  3. Release the BOOT button approximately 2 seconds after the flight controller powers on.

Hold the BOOT button to enter DFU mode

2. Show All Devices in Zadig

Open Zadig 2.8, open the Options menu, and select List All Devices.

Zadig List All Devices option

3. Select the DFU Device

Open the device list and select DFU in FS Mode. If the flight controller uses an STM32F405 MCU, the device may instead appear as STM32 BOOTLOADER.

If the corresponding device does not appear in the list, check the following:

  • Whether the BOOT button was held down before the USB cable was inserted.
  • Whether the current USB cable supports data transfer and is working correctly.

Select the DFU device in Zadig

4. Install the DFU Driver

Click Install Driver to install the WinUSB driver.

Install the WinUSB driver with Zadig

Wait for the driver installation to finish. Open Windows Device Manager. If the DFU in FS Mode device is visible, the computer has correctly recognized the flight controller in DFU mode.

DFU device recognized in Windows Device Manager

After completing the preparation above, follow the procedure below for the corresponding firmware.

Flash Betaflight Firmware

  1. Put the flight controller into DFU mode and open Betaflight Configurator.
  2. Confirm that DFU - DFU in FS Mode appears in the upper-right corner, indicating that the flight controller has been recognized correctly.
  3. Select MICOAIR743 from the target-board list.
  4. Click Load Firmware [Online] in the lower-right corner to download the online firmware.
  5. After the download is complete, click Flash Firmware on the left to begin flashing.

Flash online firmware with Betaflight Configurator

A local firmware file can also be used:

  1. Click Load Firmware [Local].
  2. Select the Betaflight firmware file on the computer.
  3. Click Flash Firmware to write the firmware to the flight controller.

Load local firmware in Betaflight Configurator

Flash local firmware in Betaflight Configurator

Flash INAV Firmware

INAV fixed a long-standing TF card recognition problem starting with version 8.0 RC3. Version 8.0 RC3 or later is recommended, together with INAV Configurator version 8.0.

Select the INAV firmware version

  1. Put the flight controller into DFU mode and open INAV Configurator.
  2. Confirm that DFU appears in the upper-right corner, indicating that the flight controller has been recognized correctly.
  3. Open the Firmware Flasher page.
  4. Select the flight controller model in the upper-left corner, such as MicoAir743 or MicoAir405v2.
  5. Select the required firmware version from the version list.
  6. Click Load Firmware [Online] to download online firmware, or click Load Firmware [Local] to load a local firmware file.
  7. Click Flash Firmware in the lower-right corner to write the firmware to the flight controller.

Flash ArduPilot Firmware

The method used to flash ArduPilot firmware depends on the firmware currently running on the flight controller.

Case One: The Flight Controller Has Never Been Flashed, or Is Not Currently Running ArduPilot

Use INAV Configurator or STM32CubeProgrammer to flash an xxx_with_bl.hex file that includes the bootloader. The flashing process may take several minutes.

1. Download the with_bl.hex Firmware

Download ArduPilot firmware with a bootloader

2. Flash with STM32CubeProgrammer

  1. Install and open STM32CubeProgrammer.
  2. Confirm that the flight controller has entered DFU mode.
  3. Select USB as the connection method in the upper-right corner of the application.
  4. Click the refresh button on the right. Under normal conditions, the application will detect USB1.
  5. Click Connect to connect to the flight controller.

Connect to the flight controller over USB in STM32CubeProgrammer

After connecting successfully:

  1. Click Open file in the upper-left corner.
  2. Select the local xxx_with_bl.hex file.
  3. Click Download.
  4. Wait several minutes for flashing to finish.

Flash HEX firmware with STM32CubeProgrammer

Case Two: The Flight Controller Is Already Running ArduPilot

In this case, load and flash an .apj file directly in Mission Planner.

  1. Disconnect the flight controller from the computer.
  2. Open Mission Planner and go to the Install Firmware page.
  3. Click Load custom firmware and select the .apj firmware file on the computer.

Load custom firmware in Mission Planner

After Mission Planner reads the firmware, a dialog appears asking you to connect the flight controller after clicking OK.

Mission Planner waiting for the flight controller to be connected

Click OK, and then connect the flight controller with a USB cable. Mission Planner automatically recognizes the flight controller and begins writing the firmware. This normally takes approximately 10 seconds.

Flash ArduPilot firmware with Mission Planner

Flash PX4 Firmware

If the flight controller is not currently running PX4 firmware, flash the PX4 bootloader first.

1. Connect STM32CubeProgrammer

Put the flight controller into DFU mode, open STM32CubeProgrammer, and connect to the flight controller.

When flashing PX4 firmware for the first time, it is recommended to erase all Flash memory first: click the eraser button in the lower-left corner of the main interface.

Erase all Flash memory in STM32CubeProgrammer

2. Flash the PX4 Bootloader

  1. Click Open file.
  2. Select the local xxx_PX4_bootloader.elf or bootloader.bin file.
  3. Click Download to begin flashing.

The path containing the .elf file must not include Chinese characters.

The bootloader file is small, so flashing normally takes only 1–2 seconds.

Flash the PX4 bootloader with STM32CubeProgrammer

After flashing is complete, disconnect the flight controller's USB connection.

3. Flash PX4 Firmware with QGroundControl

  1. Open QGroundControl and go to the Firmware page.
  2. Follow the on-screen prompt and connect the flight controller with a USB cable. Do not press the BOOT button at this stage.

QGroundControl Firmware page

After QGroundControl recognizes the flight controller, a setup window appears:

  1. Select “Advanced settings.”
  2. Select “Custom firmware file” below it.
  3. Click OK.

Select custom firmware in QGroundControl

In the file-selection window, select and open the downloaded xxx.px4 firmware file. QGroundControl begins flashing, which normally takes approximately 10 seconds. When flashing is complete, the flight controller restarts automatically and QGroundControl reconnects automatically.

Flash PX4 firmware with QGroundControl