XDK API  3.6.0
XDK Bootloader User Guide

Explains XDKs Bootloader

This page outlines some technical background on as well as the functionality of the XDK bootloader. The XDK bootloader is stored in the first 128 kB of XDKs flash memory. It is write protected and represents the only piece of software on XDK, that shall not be modified by an XDK user. When the bootloader is no longer present or becomes corrupted, an update or recovery is only possible via the J-Link JTAG Adapter (see below).

How to engage the Bootloader?

The bootloader can be engaged using the three different approaches.

When clicking the "Flash" button in XDK Workbench, XDK will be automatically brought into bootloader mode. In case XDK is not responding to XDK workbench, a popup will appear. You should now use Approach 1 to force XDK into bootloader mode.

Approach 1

This approach is the "last resort" when XDK is not responding. Even when XDK is not recognized over USB, approach 1 will still work.

Approach 2

The second approach will set a flag in the user page of the MCU of XDK. When XDK reboots, the bootloader reads the flag and engages itself. Only after booting an application, the flag is reset.

Approach 3

This is technically the same as Approach 2. More information on the commands that can be sent by USB can be found in Reset / Reboot XDK.

Bootloader Commands

When XDK is in bootloader mode, a serial terminal application (see Using a Serial Terminal) can be used to open up the (virtual) serial port of XDK. The bootloader offers the following commands:

Command Meaning Explanation Commands Supported by bootloader version/versions
u Upload application This command lets the user upload an application to the flash, while keeping the bootloader intact. For an application to work correctly it must use a linker file which places the application start address at 0x00010000 for the EFM32GG. The application is transferred using the XMODEM-CRC protocol. All Bootloader versions
i Information This command returns the bootloader version and unique chip id. All Bootloader versions
b Boot application This command will start the uploaded application.All Bootloader versions
v Verify flash checksum This command calculates the CRC-16 checksum of the entire flash and prints it.All Bootloader versions
c Verify application checksum This command calculates the CRC-16 checksum of the application and prints it. All Bootloader versions
n Verify user page checksum This command calculates the CRC-16 checksum of the user page and prints it. All Bootloader versions
m Verify lock page checksum This command calculates the CRC-16 checksum of the lock page and prints it. All Bootloader versions
r Reset This Command resets the XDK device. All Bootloader versions
e Clean This Command clears FOTA User page data and application code area of the flash memory. V1.0.0 & above
h Help Menu This Command prints the supported Bootloader commands v1.2.0
g Read the WLAN MAC address This command prints the Wlan MAC address All Bootloader versions
p Lock the bootloader flash area This command locks the bootlader flash area All Bootloader versions
w Read the BLE MAC address This command prints the ble mac address All Bootloader versions

Binary images uploaded via the bootloader must be transferred in the XMODEM-CRC format.

Bootloader Update

Updating the bootloader requires a J-Link Lite CortexM-9 JTAG Adapter or J-Link EDU Min JTAG Adapter (to be purchased seperately, you can refer to the Bosch XDK device). To perform the update, please follow those steps:

XDK Workbench will update the bootloader and reestablish the write protection for the bootloader section.

User Indication in Bootloader Mode

The following table indicates LED indications for different scenarios in bootloader mode.

Case ID Yellow Orange Red Scenarios
1 OFF OFF OFF In Application/Device Power Off.
2 OFF OFF ON In Bootloader, USB is enumerated but not connected.
3 ON OFF ON In Bootloader, USB is enumerated and connected/Recovery failed.
4 ON ON ON XDK is in Assertion in Application.
5 BlinkingOFF ON New firmware transfer through USB in Bootloader.
6 OFF BlinkingOFF Update of New Firmware in progress.
7 OFF ON ON FOTA Update Fail.

Firmware Over the Air Update

This section describes Firmware Over the Air Update when the new application is available.

  1. USB communication will not be available when the device is in scenario "Update of New Firmware in progress using FOTA" as in case(6), after successful update the application will enable USB communication.
  2. User must not try to initiate any trigger from workbench when the device is in scenario Update of New Firmware in progress using FOTA as in case(6).
  3. Maximum supported binary size for user application see section Bootloader-Application Partition information
  4. Case (6) is the only user indication currently supported to notify user that the boot loader is uploading new firmware received using FOTA.
  5. When in bootloader mode and button 2 is pressed the bootloader will jump to appplication mode

Bootloader-Application Partition information

This section describes how the microcontroller flash memory address space is separated for bootloader area and user application area

Bootloader Version No Flash Memory Bootloader MemoryApplication Memory Reserved Memory Description
V0.0.11 & below 1024KB 64KB 960 KB NULL No Restriction
V1.0.0 & V1.1.0 1024KB 128KB 600 KB (896KB J-Link) 296KB Application memory restriction of 600KB is only valid by flashing over USB not with J-Link or FOTA
V1.2.0 1024KB 128KB 896KB NULL No Restriction

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:49 by doxygen 1.8.8