跳转至

Bootloader Update Pixhawk V6X-RT via USB

This topic explains explains to flash Pixhawk FMUv6X-RT bootloader via USB without needing a debug probe.

Overview

The PX4 Bootloader is used to load firmware for Pixhawk boards (PX4FMU, PX4IO).

Pixhawk controllers usually comes with an appropriate bootloader version pre-installed. However in some cases it may not be present, or an older version may be present that needs to be updated. It is also possible that the device is bricked, so the device has to be erased and a new bootloader must be flashed.

Most flight controllers require a Debug probe in order to update the bootloader, as discussed in Bootloader Update > Debug Probe Bootloader Update. You can use this approach for the Pixhawk FMUv6X-RT, but if you don't have a debug probe you can use the instructions outlined in this topic instead.

Building the PX4 FMUv6X-RT Bootloader

This can be built from within the PX4-Autopilot folder using the make command and the board-specific target with a _bootloader suffix. For FMUv6X-RT the command is:

make px4_fmu-v6xrt_bootloader

This will build the bootloader binary as build/px4_fmu-v6xrt_bootloader/px4_fmu-v6xrt_bootloader.bin, which can be flashed via SWD or ISP. If you are building the bootloader you should be familiar with one of these options already.

If you need a HEX file instead of an ELF file, use objcopy:

arm-none-eabi-objcopy -O ihex build/px4_fmu-v6xrt_bootloader/px4_fmu-v6xrt_bootloader.elf px4_fmu-v6xrt_bootloader.hex

Flashing the bootloader through USB

The Pixhawk V6X-RT comes with a build-in bootloader located on the ROM. To flash a new bootloader through USB you've got to download the NXP MCUXpresso Secure Provisioning tool. The tool is available for Windows, Linux and macOS.

  1. Install the MCUXpresso Secure Provisioning application and launch the application:

Flash bootloader through Secure provisioning - Step 1

  1. On first start you have to create a "New Workspace". Select i.mX RT11xx and then select MIMXRT1176

Flash bootloader through Secure provisioning - Step 2

  1. After creating a "New Workspace" click on the FlexSPI NOR - simplified button

Flash bootloader through Secure provisioning - Step 3

  1. On the Boot Memory Configuration window change the "Device type" to Macronix Octal DDR and press OK.

Flash bootloader through Secure provisioning - Step 4

  1. On the menu bar select Tools > Flash Programmer:

Flash bootloader through Secure provisioning - Step 5

  1. You should get this pop-up indicating the Pixhawk V6X-RT is not in the "ISP bootloader mode".

Flash bootloader through Secure provisioning - Step 6

To get the Pixhawk V6X-RT into "ISP bootloader mode" there are 2 options:

  1. Launch QGC connect the Pixhawk select Analayze Tools and then MAVLINK Console. On the console type reboot -i. This will put the Pixhawk V6X-RT into "ISP bootloader mode"

    ISP bootloader mode

  2. If the board is bricked and connecting to QGC is not possible you've open the FMUM module and press the BOOT button (circled in red in the picture below) while powering the board.

    Press YES to launch the Flash Programmer Tool.

  3. When the Flash Programming has started you get a popup to configure the target memory press Yes

Flash bootloader through Secure provisioning - Step 7

  1. When the Target Memory configuration is succesful you can press the the Erase All button

Flash bootloader through Secure provisioning - Step 8

  1. After erasing the flash press the Load ... button and then press the Browse button

Flash bootloader through Secure provisioning - Step 9

  1. Locate the px4_fmu-v6xrt_bootloader.bin file and press Open and then press on Load.

Flash bootloader through Secure provisioning - Step 10

  1. If the load is successful you should see the "Success: load from file" at the bottom right

Flash bootloader through Secure provisioning - Step 11

  1. Press the Write button to flash the PX4 bootloader

Flash bootloader through Secure provisioning - Step 12

  1. On success it should show "Success: Write memory 0x30000000 - 0x3XXXXXXX" Note: values might differ due to bootloader changes.

Flash bootloader through Secure provisioning - Step 13

Now unplug the Pixhawk V6X-RT and re-power the board. After the bootloader has updated you can Load PX4 Firmware using QGroundControl.