This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bootloader Settings Address

Hi,

I am using sdk13 with a nrf52832 dev kit. I have two separate projects one with a bootloader and other with an application. I use the following configuration in the bootloader linker:

FLASH (rx) : ORIGIN = 0x76000, LENGTH = 0x8000

RAM (rwx) : ORIGIN = 0x20002060, LENGTH = 0xdfa0

NOINIT (rwx) : ORIGIN = 0x20007F80, LENGTH = 0x80

BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0007F000, LENGTH = 0x1000

UICR_BOOTLOADER (r) : ORIGIN = 0x10001014, LENGTH = 0x04

MBR_PARAMS_PAGE (rw) : ORIGIN = 0x0007E000, LENGTH = 0x1000

UICR_MBR_PARAM_PAGE(r) : ORIGIN = 0x10001018, LENGTH = 0x04

In the app linker:

FLASH (rx) : ORIGIN = 0x1f000, LENGTH = 0x57000 RAM (rwx) : ORIGIN = 0x20002800, LENGTH = 0xd800

BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0007F000, LENGTH = 0x1000

After flashing the bootloader and without changing the size of the bootloader settings I create the hex of the app, merge with the bootloader settings generated by nrfutil and flash the application and the bootloader recognizes the app and can boot it.

When I try to increase bootloader settings with the following changes:

Bootloader:

FLASH (rx) : ORIGIN = 0x75000, LENGTH = 0x8000

BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0007E000, LENGTH = 0x2000

MBR_PARAMS_PAGE (rw) : ORIGIN = 0x000D000, LENGTH = 0x1000

App:

FLASH (rx) : ORIGIN = 0x1f000, LENGTH = 0x56000

RAM (rwx) : ORIGIN = 0x20002800, LENGTH = 0xd800

BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0007E000, LENGTH = 0x2000

nrf_types.h:

define NRF_MBR_PARAMS_PAGE_ADDRESS (0x0007E000UL)

define BOOTLOADER_SETTINGS_ADDRESS (0x0007F000UL)

When i flash, the app settings are still written to the 0x7f000 position so the bootloader does not recognize the app.

Does anyone know if it is necessary to change anything else?

  • Hi,

    Could you tell what exactly you want when you modify the bootloader setting ? I can see you move the MBR PARAM page to 0x000D000, why ? It's not a good location. If you simply want to move the bootloader down to 0x75000, you should only modify that, not other parameters. Why do you want to move the bootloader setting page ? You are colliding it with the MBR Param page.

Related