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

Bootloader can't switch to application using mergehex tool

Hi, In my project I need to program softdevice+bootloader+application at a time, for these previously I used mergehex tool to merge Softdevice, Bootloader,application and app_valid_setting_appy.hex and created single hex file and programmed by using nrfjprog.exe and it works fine.

Now I implemented a signed bootloader for secure dfu, at thise time also I need to program softdevice+bootloader+application at a time, for these I merged softdevice.hex, nrf_sec.hex, bootloader.hex, application.hex, app_valid_setting_apply.hex in following order

softdevice.hex+nrf_sec.hex = SD_SEC.hex SD_SEC.hex+ bootloader.hex = SD_SEC_BL.hex SD_SEC_BL.hex+application.hex=SD_SEC_BL_APP.hex SD_SEC_BL_APP.hex+app_valid_setting_apply.hex=SD_SEC_BL_APP_Settings.hex

when I programmed the final hex file SD_SEC_BL_APP_Settings.hex by using nrfjprog.exe it directly entries to bootloader always . If I programmed softdevice, nrf_sec.hex,and bootloader one by one by using nrfjprog after then application is programmed through dfu it working fine.

for these project I used nRF51_SDK_9.0.0_2e23562, s110 softdevice and the signed boot loader is nRF51_SDK_9.0.0_2e23562\examples\dfu\experimental\bootloader_signing.

Is the app_valid _setting_apply.hex is work for signed booloader? can any one suggest me to slove thise problem.

  • Difference between the normal bootloader and the one with signing is that the sec module is located at the same flash page as bootloader settings. So it is possible that the app_valid _setting_apply.hex has to be modified to work with the signing bootlaoder.

    With that being said, I think it should be easier to just set the app flag manually with nrfjprog or set set the flag in your bootloader code. See question 'E' in this FAQ for instructions on how to do this.

Related