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

update nrf dfu bootloader from SDK15 with bigger one

Hey,

I am using SDK16 and want to update the bootloader on my NRF52840 from SDK15 with a new one.

I modified the bootloader from SDK16 a little bit. Then I created a Zip file from the bootloader and proceeded the dfu update. This version of the update works fine.

But now, I added more code to the new bootloader and so, I hade to increase the size of the bootloader. Therefore, I also hade to change the start_address of the

bootloader from 0x7000 to 0x5000. After doing that, I created a zip file from the new and bigger BL again. But now I get the error: "INSUFFICIENT RESSOURCES" from the init package, because the bootloader checks, if the new one is bigger than the old bootloader.

Is it literally not possible, to update the bootloader with a bigger one or do I understand something wrong?

Does the SD_MBR_COMMAND from the softdevice not accept a target address to activate a bootloader, which is bigger than the old one?

Is ther any workaround to activate a bootloader, which is bigger than the old one?

Thank you Slight smile

  • Does the SD_MBR_COMMAND from the softdevice not accept a target address to activate a bootloader, which is bigger than the old one?

    Nope.

    Reason is simple: Any power loss (or other unexpected problem/reset) during the size change could brick the device, espacially when UICR or MBR needed an erase cycle.

    You really want to do this with an jlink debugger/programmer via SWD.

    It is THEORETICALLY possible to write an intermediate bootloader that changes the address from 0x7000 to 0x5000 since that would only need a bit flip in 1->0 direction - which is possible without an erase cycle.

    But it would require at least some free space in the old bootloader area in order to be able to make this change somewhat safely - and you would also have to worry about FDS data, which is normally stored right below the bootloader space.

Related