Skip to main content

Bootloader

The 305ap uses the standard PX4 bootloader, built for this board. It lives in the first flash sector and starts the PX4 application. It also accepts firmware uploads from QGroundControl and px_uploader.py.

Behavior at Power-Up​

  1. The bootloader starts and enumerates on USB as "PX4 BL 305AP" (VID 0x1B8C, PID 0x0036).
  2. It waits 5 seconds for an upload request. The blue LED blinks while it waits.
  3. If no upload starts, it jumps to the PX4 application. The board then re-enumerates on USB as "305AP" (same VID/PID), and the application's MAVLink port appears.

During an upload the green LED is on solid.

The bootloader runs on every power-up, so a board with working firmware never needs DFU mode for an update.

Memory Layout​

RegionAddressSize
Bootloader0x08000000–0x0801FFFF128 KB (sector 0)
PX4 application0x08020000up to 1920 KB

Uploading firmware erases and writes the application area only. The bootloader is never overwritten by a normal firmware update.

Board Identity​

FieldValue
Board ID12100
USB product (bootloader)PX4 BL 305AP
USB product (application)305AP
USB VID / PID0x1B8C / 0x0036

The board ID is stored in every .px4 file and reported by the bootloader. QGroundControl and px_uploader.py compare the two and refuse firmware built for another board.

Reinstalling the Bootloader​

You only need this for a blank board or if the bootloader itself is damaged (the board never enumerates as PX4 BL 305AP).

  1. Put the board in DFU mode: hold BOOT, apply power (or press RESET), release BOOT. It enumerates as an STM32 DFU device.

  2. Flash the bootloader binary to the start of flash:

    dfu-util -a 0 -s 0x08000000:leave -D avianautomata_305ap_bootloader.bin
  3. Power-cycle. The board should enumerate as PX4 BL 305AP and blink blue for 5 seconds.

  4. Install firmware as described in Quickstart, Step 2.

The bootloader binary is built with make avianautomata_305ap_bootloader (see Building from Source). A prebuilt copy is kept in the board directory at boards/avianautomata/305ap/extras/avianautomata_305ap_bootloader.bin.

note

The bootloader changes rarely. Updating PX4 firmware does not require a new bootloader.

Troubleshooting​

SymptomLikely causeFix
Blue LED blinks, then no 305AP USB deviceApplication missing or crashing at startReinstall firmware from QGroundControl
Nothing enumerates on USB, no LEDsNo bootloader, or no powerCheck power; reinstall the bootloader via DFU
QGroundControl never finds the boardBoard already running when QGroundControl started waitingUnplug the battery and USB, then plug in USB while QGroundControl waits
px_uploader.py reports a board ID mismatchFirmware built for a different boardUse an avianautomata_305ap .px4 file