I am using nRF51 and latest s310 softdevice (3.0.0) and latest SDK (v10), which is the latest compatible with the softdevice.
My device is programmed with the softdevice and the dual-bank DFU BLE bootloader.
I want to update to single-bank bootloader.
I create the single-bank bootloader by substituting "dfu_single_bank.c" for "dfu_dual_bank.c" in my Makefile.
The resulting DFU works when I load it directly, but bricks the device when I update it with the NRF toolbox.
I create the zip image with nrfutil:
nrfutil dfu genpkg ~/Dropbox/firmware/bootloader_only.zip \
--bootloader bootloader.hex
Then I upload it from my phone with nrf toobox.
What I expect to happen: The new bootloader is installed and working
What actually happens: The device is bricked and must be recovered over JTAG.
Looking at the memory map, it looks like this happened:
-
The dual bank bootloader received the new image and copied it into bank 1.
-
After verification, it copied the wrong bank into the bootloader space. Now 0x3c000 has a copy of the first blocks of the application code in bank 0, not the bootloader image in bank 1!