Can ncs image run with sdk 15.3 bootloader?

Hi Nordic,

Currently my project is using SDK 15.3. By taking a look at NCS SDK, I
can see lots of features there and plan to migrate my project to NCS
1.9.0. However, since my hardwares with SDK 15.3 bootloader have been
distributed to customers, I can not change that bootloader - because it
is customized with my own key. I believe that's quite different with b0
bootloader.

So my question is, can I run NCS build as image file directly using SDK
15.3 bootloader? Eg, create an hex image and use SDK 15.3 bootloader DFU
to do image upgrade. Can I do that?

I can not find any materials related this, would you please confirm? Any
documentation about steps/information are welcome. I still do not know how to build it in NCS. Thanks.

Vincent

Parents
  • Hi Nine-Fox,

    It's actually possible to update from nRF5 SDK v15.3 to an NCS application. However it's not a straight forward process. As you may know the nRF5 SDK application contain of MBR+Softdevice+Application+Bootloader. All of these can be replaced except for the MBR (it's similar to the immutable bootloader). So you would need to reconfigure the NCS application to run from address 0x1000 instead of address 0x0000000. Also you would need to trick the bootloader to think that it's updating the softdevice+bootloader instead of updating to NCS application (basically remove the softdevice). 

    There are quite a few discussion on devzone that you can search for. I would suggest to have a look at this thread. My coworker, Amanda, provided an example that you can update from SDK v17.0 to NCS application. 

    I haven't tried myself but let us know if you have any issue following the instruction from Amanda. 

  • Thanks for your reply! I did some investigation, however, replace my bootloader is not an option - since it contains my high-customized function with my tools developed. 

    May I ask, considering my current app starts from 0x26000, can I just replace it with ncs image? Because nrf52840 has enough space, no need to remove softdevice. Would you please confirm? Thanks!

  • Hi Nine-fox, 

    It should be possible to do what you want.

    My assumption is that on normal operation you want to use the Zephyr application. But when you need to do DFU you can jump to the bootloader and the bootloader will use the softdevice to receive the new image as before. 

    The issue here is that normally when the bootloader boots, it will jump to the softdevice and then softdevice jumps to application. The problem with process is that the softdevice even when disabled still need some RAM and occupies SVC interrupts. 

    You can configure the Zephyr application to avoid these and can work normally (I don't think we have tested this). But a better option is to avoid triggering the softdevice at all. Meaning you need to modify the bootloader to jump directly to the application (0x26000) instead of jumping to 0x1000 normally. 

    This is a very small change in the bootloader that doesn't affect your own DFU protocol. 

    In addition, you need to change the Zephyr application's start address to 0x26000. 

Reply
  • Hi Nine-fox, 

    It should be possible to do what you want.

    My assumption is that on normal operation you want to use the Zephyr application. But when you need to do DFU you can jump to the bootloader and the bootloader will use the softdevice to receive the new image as before. 

    The issue here is that normally when the bootloader boots, it will jump to the softdevice and then softdevice jumps to application. The problem with process is that the softdevice even when disabled still need some RAM and occupies SVC interrupts. 

    You can configure the Zephyr application to avoid these and can work normally (I don't think we have tested this). But a better option is to avoid triggering the softdevice at all. Meaning you need to modify the bootloader to jump directly to the application (0x26000) instead of jumping to 0x1000 normally. 

    This is a very small change in the bootloader that doesn't affect your own DFU protocol. 

    In addition, you need to change the Zephyr application's start address to 0x26000. 

Children
No Data
Related