Downloaded an used the latest (2 months old) code from DFU-Bootloader-for-nRF51-Evaluation-Kit
After it didn't work out the gate, I've attempted to narrow down and root cause reasoning.
Seems the code initializes fine, but the function: bootloader_app_is_valid() always fails.
Reasoning, it is always pulling
bootloader_settings.bank_0 == 0xFF (INVALID_APP)
from
m_boot_settings
where
m_boot_settings = uint8_t m_boot_settings[CODE_PAGE_SIZE] __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used)); /**< This variable reserves a codepage for bootloader specific settings, to ensure the compiler doesn't locate any code or variables at his location. */)
I suspect there was a mistake made, where it should be calling:
bootloader_settings_get()
where this function pulls from pstorage.
However, while this works the first time (after DFU updates), it doesn't work in subsequent boots.
Unsure what the proper architecture here is supposed to be, and why this code consistently fails.
Can anyone comment on if accessing the memory directly (via m_boot_settings) is supposed to work?
Aside: Using SoftDevice 7.1.