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

DFU : Which code sets bootloader_settings->bank_0 = BANK_VALID_APP

I am trying DFU to work with gcc and SoftDevice 7.1.

Problem: MCP able to send the APP binary successfully to the bootloader and DFU bootloader correctly write the app in the flash. However the application is not starting and the control is in DFU mode always.

After some debugging it is because bootloader_app_is_valid() is always returing false because bootloader_settings(0x3fc00) is 0.

I am able to see the APP data(0x16000) on the flash. I need help figuring out the missing piece which updates the bootloader_settings(0x3fc00).

bootloader_dfu_update_process() seems to be function where it can be done, but in the SDK code it is missing. Since it is working for everybody, I guess I am missing something here.

Note: I can hard code the bootloader settings and get the application loaded(and it works fine) but want to know whether DFU bootloader will eventually write this or not?

attribute ((section(".bootloaderSettings"))) uint8_t m_boot_settings[1024] = {BANK_VALID_APP};

Related