User Guide: Updating The Bootloader

raemin edited this page Sep 27, 2017 · 19 revisions

The bootloader is what allows you to upgrade your firmware at any time. From time to time the bootloader may need to be updated to allow more flash space for firmware etc. The number one reason you would want to upgrade the bootloader is when upgrading from betaflight to dRonin!

Updating The Bootloader Using Betaflight configurator

(note : does not work if the board already has a dRonin bootloader)

You can flash ef_xxxxxxx.hex (eg: ef_revolution.hex for a revolution flight controller) from the dRonin firmware folder using the beta/cleanflight configurator.

If you're working in windows, in the installation folder of dRonin, you'll find a subdirectory called firmware, with the above mentioned ef_xxxxxxx.hex file.

You can check that the bootloader was successfully written by unplugging and replugging the USB cable. The blue LED should begin slowly pulsing. This means that the bootloader is running, but that there is no valid autopilot firmware. Advance to the next step to OnlineHelp: Uploader Plugin.

(note2: if this does not work with betaflight configurator, cleanflight configurator may work better)

Updating The Bootloader Using GCS

(note : does not work if the board has a betaflight bootloader)

The basic process is:

  • start GCS,
  • connect the flightcontroller through USB,
  • wait for LED to stop pulsing on board, wait some more,
  • unplug, hit rescue, replug,
  • Flash bu_xxxxxxxx.tlfw using GCS.

Advanced technique : F3/F4 Boards semi automated upgrade

User yds, made a usefull script which updates most bootloader (except F1 flight controllers).

To make flashing the dRonin bootloader a little less painful put this dfu-bootloader.bat script and a copy of dfu-util.exe in the dRonin/bin/ directory and run it from there.

See his explanation in the forum. Note that, when asked by the dfu-bootloader.bat script to fix the drivers with Zadig, one may use instead ImpulseRC Driver Fixer which does the same in a friendlier way.

You can check that the bootloader was successfully written by unplugging and replugging the USB cable. The blue LED should begin slowly pulsing. This means that the bootloader is running, but that there is no valid autopilot firmware. Advance to the next step to OnlineHelp: Uploader Plugin.

Advanced technique : F3/F4 Boards manual upgrade using DFU-Util

If the above failed, there is this old set of instructions. BE WARNED this could be outdated!

You can either :

  • install dfu-util using the dRonin toolchain with the command make dfuutil_install,
  • OR using your package manager (e.g. apt-get install dfu-util on Ubuntu or brew install dfu-util on Mac)
  • OR a copy of dfu-util.exe

Grab the bootloader provided in the package bl_<target>.bin . If you're working in windows, in the installation folder of dRonin, you'll find a subdirectory called firmware, with the above mentioned file. In Linux (Debian install): /usr/local/dRonin/firmware/bl_<target>.bin . In macOS (installed): /Applications/dRonin\ GCS.app/Contents/Resources/firmware/bl_<target>.bin .

The command to flash the bootloader is:

dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D bl_<target>.bin

You can check that the bootloader was successfully written by unplugging and replugging the USB cable. The blue LED should begin slowly pulsing. This means that the bootloader is running, but that there is no valid autopilot firmware. Advance to the next step to OnlineHelp: Uploader Plugin.

Advanced technique : F1/F3/F4 Boards manual upgrade using Windows using ST-Link Utility

Addtionally you will need a bootloader bin for your flight controller. This will be named bl_<target>.bin and should be included in the firmware subdirectory.

Using USB connector (F3/F4 board only)

  • Install the ST-Link Utility from here STM32 ST-LINK utility
  • Short the bootloader pads
  • Connect the FlightController board using the mini-usb connector
  • Start STM32 ST-LINK Utility
  • Select Target->Connect from the menu
  • Select Target-> Erase Chip from the menu
  • Select File -> Open File... from the menu
  • Choose the appropriate bootloader. Bootloaders are prefaced by bl_. For instance, if you are flashing the FlyingF3, this will be in firmware/bl_flyingf3.bin
  • Confirm the dialog box which asks to write the data to the target
  • Close the software and you're done :)

You can check that the bootloader was successfully written by unplugging and replugging the USB cable. The blue LED should begin slowly pulsing. This means that the bootloader is running, but that there is no valid autopilot firmware. Advance to the next step to OnlineHelp: Uploader Plugin.

Note: You may need to fix the drivers with Zadig or ImpulseRC Driver Fixer.

Using UART1 connector (a.k.a Main Port)

You will need dfu-util (cross-platform) or ST-Link (Windows only) to flash the bootloader.

For this operation you will need a serial port (a.k.a RS232C), if your computer is not provided with such a port, just buy a cheap USB to Serial adapter (a.k.a FTDI adapter).

  • Install the ST-Link Utility from here STM32 ST-LINK utility
  • Short the bootloader pads
  • Connect to the FlightController mainport using the USB to serial adapter
  • Start STM32 ST-LINK Utility
  • Select Target->Connect from the menu
  • Select Target-> Erase Chip from the menu
  • Select File -> Open File... from the menu
  • Choose the appropriate bootloader. Bootloaders are prefaced by bl_. For instance, if you are flashing the CC3D, this will be in firmware/bl_cc3d.bin
  • Confirm the dialog box which asks to write the data to the target
  • Close the software and you're done :)

For more info follow the Tutorial by SouthQuay. Note that the tutorial does not clearly explain how to connect the FlightController "Main Port" to the USB to serial adapter. On the Eachine Racer Discussion, you'll find more details, including a photo that pictures the MainPort with the connector details (specifying which wire is RX, and which is TX).

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.