Skip to content

부트로더 업데이트

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 is not present, or an older version is present that needs to be updated, or the board has been bricked and needs to be erased and the bootloader reinstalled.

이 섹션은 픽스호크 부트로더를 업데이트 방법을 설명합니다.

INFO

Building the PX4 Bootloader

PX4 Bootloader FMUv6X and later

FMUv6X STM32H7)로 시작하는 보드는 인트리 PX4 부트로더를 사용합니다.

This can be built from within the PX4-Autopilot directory using the make command and the board-specific target with a _bootloader suffix.

For FMUv6X the command is:

sh
make px4_fmu-v6x_bootloader

This will build the bootloader binary as build/px4_fmu-v6x_bootloader/px4_fmu-v6x_bootloader.elf, which can be flashed via SWD or DFU. 부트로더를 빌드하는 경우 이러한 옵션중 하나를 충분히 숙지하여야합니다.

ELF 파일 대신 HEX 파일이 필요한 경우에는 objcopy를 사용하십시오.

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

PX4 Bootloader FMUv5X and earlier

사용 방법은 README의 지침을 참조하십시오.

The instructions in the repo README explain how to use it.

Debug Probe Bootloader Update

The following steps explain how you can "manually" update the bootloader using a compatible Debug Probe:

  1. Get a binary containing the bootloader (either from dev team or build it yourself).

  2. Get a Debug Probe. Connect the probe your PC via USB and setup the gdbserver.

  3. Go into the directory containing the binary and run the command for your target bootloader in the terminal:

    • FMUv6X

      sh
      arm-none-eabi-gdb px4_fmu-v6x_bootloader.elf
    • FMUv6X-RT

      sh
      arm-none-eabi-gdb px4_fmu-v6xrt_bootloader.elf
    • FMUv5

      sh
      bash
      arm-none-eabi-gdb px4fmuv5_bl.elf

    H7 Bootloaders from PX4/PX4-Autopilot are named with pattern *._bootloader.elf. Bootloaders from PX4/PX4-Bootloader are named with the pattern *_bl.elf.

:::

  1. The gdb terminal appears and it should display the following output:

    sh
    bash
      GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git
      Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <a href="http://gnu.org/licenses/gpl.html" x-nc="1">http://gnu.org/licenses/gpl.html</a>
      This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying"    and "show warranty" for details.
    This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
      <a href="http://www.gnu.org/software/gdb/bugs/" x-nc="1">http://www.gnu.org/software/gdb/bugs/</a>.
    Find the GDB manual and other documentation resources online at:
      <a href="http://www.gnu.org/software/gdb/documentation/" x-nc="1">http://www.gnu.org/software/gdb/documentation/</a>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from px4fmuv5_bl.elf...done.
  2. Find your <dronecode-probe-id> by running an ls command in the /dev/serial/by-id directory.

  3. Now connect to the debug probe with the following command:

    sh
    tar ext /dev/serial/by-id/<dronecode-probe-id>
  4. Power on the Pixhawk with another USB cable and connect the probe to the FMU-DEBUG port.

    If using a Dronecode probe you may need to remove the case in order to connect to the FMU-DEBUG port (e.g. on Pixhawk 4 you would do this using a T6 Torx screwdriver).

:::

  1. Use the following command to scan for the Pixhawk`s SWD and connect to it:

    sh
    (gdb) mon swdp_scan

(gdb) attach 1


1. 이제 바이너리를 픽스호크에 로드하십시오:

```sh
(gdb) load

After the bootloader has updated you can Load PX4 Firmware using QGroundControl.

QGC Bootloader Update

The easiest approach is to first use QGroundControl to install firmware that contains the desired/latest bootloader. 그런 다음, 매개변수 SYS_BL_UPDATE를 설정하여 재시작시 부트로더 업데이트를 실행합니다.

This approach can only be used if SYS_BL_UPDATE is present in firmware.

WARNING

Currently only FMUv2 and some custom firmware includes the desired bootloader.

단계는 다음과 같습니다:

  1. SD카드를 삽입합니다 (발생 가능한 문제들의 디버깅을 위한 부트 로그 기록을 가능하게 합니다.)

  2. 적절한 부트로더를 포함하는 이미지를 사용하여 펌웨어를 업데이트합니다.

    INFO

The updated bootloader might be supplied in custom firmware (i.e. from the dev team), or it or may be included in the latest main branch. :::

  1. 기체가 재부팅될 때까지 기다리십시오.
  2. SYS_BL_UPDATE 파라미터를 찾아서 활성화 하십시오.
  3. 재부팅하십시오 (보드의 연결을 끊고 다시 연결하십시오.). 부트로더 업데이트는 수초내에 완료됩니다.

일반적으로이 시점에서 새로 설치된 부트로더를 사용하여 다시 펌웨어를 업데이트 할 수 있습니다.

An specific example of this process for updating the FMUv2 bootloader is given below.

FMUv2 Bootloader Update

If QGroundControl installs the FMUv2 target (see console during installation), and you have a newer board, you may need to update the bootloader in order to access all the memory on your flight controller.

Early FMUv2 Pixhawk-series flight controllers had a hardware issue that restricted them to using 1MB of flash memory. The problem is fixed on newer boards, but you may need to update the factory-provided bootloader in order to install FMUv3 Firmware and access all 2MB available memory.

To update the bootloader:

  1. SD카드를 삽입합니다 (발생 가능한 문제들의 디버깅을 위한 부트 로그 기록을 가능하게 합니다.)

  2. Update the Firmware to PX4 master version (when updating the firmware, check Advanced settings and then select Developer Build (master) from the dropdown list). QGroundControl will automatically detect that the hardware supports FMUv2 and install the appropriate Firmware.

    FMUv2 업데이트

    기체가 재부팅될 때까지 기다리십시오.

  3. SYS_BL_UPDATE 파라미터를 찾아서 활성화 하십시오.

  4. 재부팅하십시오 (보드의 연결을 끊고 다시 연결하십시오.). 부트로더 업데이트는 수초내에 완료됩니다.

  5. Then Update the Firmware again. This time QGroundControl should autodetect the hardware as FMUv3 and update the Firmware appropriately.

    FMUv3 update

    If the hardware has the Silicon Errata it will still be detected as FMUv2 and you will see that FMUv2 was re-installed (in console). In this case you will not be able to install FMUv3 hardware.

:::

기타 보드 (Non-Pixhawk)

Pixhawk 시리즈가 아닌 보드는 자체적인 부트로더 업데이트 방식이 있습니다.

Betaflight로 사전 플래싱된 보드에 대해서는 Betaflight 시스템 부트로더 플래싱을 참조하십시오.