4. Secondary bootloader

Secondary bootloader application Location

The secondary bootloader is a separate application which is located under:
  • utilities\secondary_bootloader\secondary_bootloader.uvprojx

In order to build the secondary bootloader, choose the desired target . After a successful build a .hex file will be located respectively under:
  • utilities\secondary_bootloader\out_DA145[xx]\Objects\

At power up or reset of the DA1453x/DA1458x, the primary boot code (ROM code) loads the secondary bootloader (from OTP memory or flash) and the secondary bootloader proceeds and copies the FLASH image to the system RAM and programs the execution.

The secondary bootloader allows the DA1453x/DA1458x to boot from an external SPI Flash memory or the UART interface. Support for 1-wire and 2-wires UART exists for DA1453x. For more information about the 1-wire and 2-wires UART configuration for DA1453x.

The secondary bootloader supports a dual image boot scheme, which is used in Software Update Over the Air (SUOTA) applications to update product firmware in the field. The dual image bootloader specifies how two application images can be stored in an external SPI Flash memory and defines how the current image is determined.

Configuration

  • The secondary bootloader application is configured to operate in dual image mode if the option SUPPORT_AN_B_001 is undefined in the header file bootloader.h.

  • Application image decryption support is enabled if the option AES_ENCRYPTED_IMAGE_SUPPORTED is defined to 1 in the same header file.

Flash memory map

Please see the flash memory map of DA14585 (Table 6) and DA14535/DA14531 (Table 7) in order to see where the secondary bootloader is located in the flash memory.

Table 6 DA14585 Flash Memory Map

0x00000

Secondary Bootloader

0x06000

DSPS Image 1

0x1A000

DSPS Image 2

0x2E000

DSPS ConfigurationImage 1

0x2F000

DSPS ConfigurationImage 2

0x39000

Product header

Table 7 DA14535/DA14531 Flash Memory Map

0x00000

Secondary Bootloader

0x06000

DSPS Image 1

0x10000

DSPS Image 2

0x1A000

DSPS ConfigurationImage 1

0x2B000

DSPS ConfigurationImage 2

0x1F000

Product header