25. SUOTA Secondary Bootloader

The SUOTA Secondary Bootloader is responsible for loading the correct application image, from external non-volatile memory, into RAM and starting its execution. To do this, it first searches this memory for the product header, and from this it determines the start location of each application image area. The bootloader then reads the Single Image Header (if present) from each of these areas and determines which image to load by checking the image ID field. Once the image has been selected, it is loaded into RAM (and decrytped if required) and then executed.

25.1. Building the Secondary Bootloader

A secondary bootloader binary file is provided with the SmartSnippets Toolbox. This is used by by default when creating multi-image SUOTA files. However, in some cases it is necessary to customize the secondary bootloader, for example when the location of the product header is changed as if often the case when using a different sized memory. The secondary bootloader project is provided as part of SDK6 and can be found within the \utilities\secondary_bootloader folder.

To build, simply use the supplied Keil project file.

25.1.1. Programming into OTP

The secondary bootloader can be located in external flash, along with the application images, or can be stored in the internal OTP present on all DA1453x/DA1458x devices. See the OTP Programming section for detailed instructions regarding how to program OTP.