Skip to content

User Guide: Updating The Bootloader

raemin edited this page Mar 13, 2016 · 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.

Updating The Bootloader Using GCS

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_.tlfw using GCS,

Rescuing Bricked Boards & Restore original bootloader

Sometimes bad things happen and the bootloader gets damaged, e.g. you don't wait for the bootloader updater to finish, or the board becomes disconnected while the bootloader updater is running. You can repair the bootloader using the USB or serial interface as described in this section, or using a debugger as described in the OpenOCD section. The same applies if you want to revert back to the original bootloader.

F1 Boards

CopterControl/CC3D, PipXtreme/TauLink.

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). From then on, Follow the Tutorial by SouthQuay

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.

  • If you plan to revert to the original open-pilot bootloader, use the suggested CC3D_bootloader_HEX.
  • If you plan to manually instal dRonin bootloader grab the bootloader provided in the package bl_coptercontrol.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.

F3/F4 Boards

BE WARNED this is an old set of instructions, that may be outdated!

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

DFU-Util

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). 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.

The command to flash the bootloader is:

[tools/dfu-util/bin/]dfu-util -R -a 0 -s 0x08000000 -D bl_<target>.bin

Windows using ST-Link Utility

The procedure is similar to the F1boards so have a look first at this section in order to get used with the STMicroelectronics utility.

  • Install the ST-Link Utility from here STM32 ST-LINK utility
  • Connect the STM32F3Discovery board using the mini-usb connector marked USB ST-LINK
  • 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.

Clone this wiki locally