Adding Gecko Bootloader to Bluetooth projects

by <a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero Employee</font></font> </a> arkalvac on ‎04-12-2017 10:49 AM

In Bluetooth SDK v2.3 Bluetooth projects do not include Gecko Bootloader by default.

  • In projects for EFR32BG1 devices the legacy bootloader is included, placed at address 0x0000
  • In projects for EFR32BG12 devices no bootloader is included. In these devices the application is placed at address 0x0000

If you want to add Gecko bootloader do the followings:

 

First method

  1. Build your Bluetooth application
  2. Flash your Bluetooth application (.s37 OR .hex OR .bin) to the device.
  3. Create a new Gecko Bootloader project, e.g. BGAPI UART DFU Bootloader
    (click New Project button in Simplicity Studio, select Gecko Bootloader, select BGAPI UART DFU Bootloader)
  4. Generate and build it
  5. Flash the .s37 file that ends with „–combined” (e.g. bootloader-uart-bgapi-s37) file to the device. This will overwrite the legacy bootloader in EFR32BG1 devices or the dummy bootloader in EFR32BG12 devices.

Note: bootloader-uart-bgapi-combined.s37 contains the first+second stage of the Gecko Bootloader, while bootloader-uart-bgapi.* contains only the second stage. The first+second stage is needed when flashing the bootloader the first time, while the second stage is needed when upgrading the bootloader (either by flashing or by DFU).

 

Second method

  1. If you use a EFR32BG1 device, remove the legacy bootloader from the Bluetooth application project
    1. Right click on your project -> properties
    2. Find C/C++ build > Settings > GNU ARM C Linker > Miscellaneous OR
      C/C++ build > Settings > IAR Linker for ARM > Library
    3. Remove binbootloader.o
  2. Build your Bluetooth application
  3. Create a new Gecko Bootloader project, e.g. BGAPI UART DFU Bootloader
    (click New Project button in Simplicity Studio, select Gecko Bootloader, select BGAPI UART DFU Bootloader)
  4. Generate and build it
  5. Merge the (combined) bootloader and the application image:
    commander convert bootloader-uart-bgapi-s37your_application.s37 -o app+bootloader.s37
  6. Flash the merged image to the device

Note: commander.exe can be found in: C:\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\commander\