DA14531 Further secondary bootloader optimization for large image files

ID: LPCBARESDK-780

Status: Fixed

First reported: 6.0.14.1114

Fixed in: 6.0.22.1401

Description

The secondary bootloader is used to replace the ROM bootloader for application that requires different boot pins than used in the ROM bootloader. You can refer to the AN-B-072: DA14531 Booting from OTP and Serial Interfaces. The secondary bootloader available in the SDK 6.0.20 6.0.20.1338\utilities\secondary_bootloader fails to boot images larger than 37 KB.

#define MAX_CODE_LENGTH             (SDK_SEC_BOOTLOADER_LOAD_IMAGE_SIZE_INIT_VALUE - SYSRAM_COPY_BASE_ADDRESS)
#define SYSRAM_COPY_BASE_ADDRESS    (SDK_SEC_BOOTLOADER_COPY_BASE_ADDRESS)
#define SDK_SEC_BOOTLOADER_LOAD_IMAGE_SIZE_INIT_VALUE      (0x9100)
#define SDK_SEC_BOOTLOADER_COPY_BASE_ADDRESS    (0x300)

Workaround

Apply this change in the sdk_defs.h : the secondary bootloader load image size should be set to 0x9500 instead of 0x9100

#define SDK_SEC_BOOTLOADER_LOAD_IMAGE_SIZE_INIT_VALUE      (0x9500)