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

Combining DFU bootloader with application that doesn't use softdevice.

I am using SDK15.3.0 and softdevice 6.1.1 on a nrf52DK.

I have a binary (compiled contiki application) that works when I flash it using nRF Connect. It is flashed from address 0x0000000 to 0x00008318. 

Now I want to be able to update this binary using DFU, so i need a bootloader with DFU. My plan is to reboot from my application into DFU mode when necessary using the GPREGRET register.

I am using the secure_bootloader_ble_s132_pca10040_debug bootloader. When I flash this bootloader and then do a DFU with the example ble_app_buttonless, I see the buttonless example is flashed from address 0x00026000. This is all working.
Now I think I can just replace the buttonless example with my application, so my binary should be flashed from address 0x00026000 (just like the buttonless example) I guess. I used the srec_cat tool to offset my binary from 0x0000000 to ox00026000. 

After doing this, I do a DFU update with my binary. I see it is flashed on the correct location. The problem is that my application does not start. Any idea what could be the issue?

Parents
  • Just to clarify, below you can see the memory usage of the working ble_app_buttonless example. The buttonless example is written from 0x00026000 to 0x000329E8. The other occupied space is the bootloader and the softdevice I guess.

    Below is my application, it also starts at 0x00026000, the bootloader and softdevice (which is not used by my application) are also present. I would assume the bootloader gives control to the softdevice and the softdevice will give control to the application at address 0x00026000, which is where my application is.

Reply
  • Just to clarify, below you can see the memory usage of the working ble_app_buttonless example. The buttonless example is written from 0x00026000 to 0x000329E8. The other occupied space is the bootloader and the softdevice I guess.

    Below is my application, it also starts at 0x00026000, the bootloader and softdevice (which is not used by my application) are also present. I would assume the bootloader gives control to the softdevice and the softdevice will give control to the application at address 0x00026000, which is where my application is.

Children
Related