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

How to add bootloader to existing app?

I could run the examples like blinky just out of the box

But, I am clueless how to add a bootloader to this example. I just want to add a simple bootloader from Open Bootloader example to the blinky example

I get the point that in the bootloader I must provide the address for jumping to app start. But a lot of points like converting to hex file, merging and getting the memory layout right is intimidating. Can a simple set of steps be provided?

I already almost bricked my nRF52840 DK. Hence want to go informed way

It was very hard to get the documentation with broken links everywhere

Parents
  • Hi,

    But, I am clueless how to add a bootloader to this example. I just want to add a simple bootloader from Open Bootloader example to the blinky example

    The open bootloader example is only provided with USB transport, but you can adapt the secure bootloader to allow updates of application etc. without a signed image, for instances as mentionned in this post. I would think twice about skipping signed firmware updates for a real end product, though.

    You can use an unmodified application in the simple case where you don't need buttonless DFU nor bond sharing. In that case, you just hold down a button (or assert a GPIO in another way) during reset to trigger DFU mode. If not, it will be a bit more complex and you should refer to the examples and documentation to see how it is done. You can always create questions here when you have specific issues.

    I get the point that in the bootloader I must provide the address for jumping to app start. But a lot of points like converting to hex file, merging and getting the memory layout right is intimidating. Can a simple set of steps be provided?

    DFU is unfortunately quite complex, so you should spend some time understanding it. I recommend you refer to this guide for a gentle introduction to DFU. Then you could move on to the DFU examples and bootloader library documentation.

    I already almost bricked my nRF52840 DK. Hence want to go informed way

    It should not be possible to brick the DK (without doing something physical to it). If everything goes wrong, you could be able to recover from any issue using "nrfjprog.exe --recover".

    It was very hard to get the documentation with broken links everywhere

     We have some issues with the documentation platform, and just reverted to the old platform (Infocenter). This has resulted in dead links, but we will fix dead links going forward.

Reply
  • Hi,

    But, I am clueless how to add a bootloader to this example. I just want to add a simple bootloader from Open Bootloader example to the blinky example

    The open bootloader example is only provided with USB transport, but you can adapt the secure bootloader to allow updates of application etc. without a signed image, for instances as mentionned in this post. I would think twice about skipping signed firmware updates for a real end product, though.

    You can use an unmodified application in the simple case where you don't need buttonless DFU nor bond sharing. In that case, you just hold down a button (or assert a GPIO in another way) during reset to trigger DFU mode. If not, it will be a bit more complex and you should refer to the examples and documentation to see how it is done. You can always create questions here when you have specific issues.

    I get the point that in the bootloader I must provide the address for jumping to app start. But a lot of points like converting to hex file, merging and getting the memory layout right is intimidating. Can a simple set of steps be provided?

    DFU is unfortunately quite complex, so you should spend some time understanding it. I recommend you refer to this guide for a gentle introduction to DFU. Then you could move on to the DFU examples and bootloader library documentation.

    I already almost bricked my nRF52840 DK. Hence want to go informed way

    It should not be possible to brick the DK (without doing something physical to it). If everything goes wrong, you could be able to recover from any issue using "nrfjprog.exe --recover".

    It was very hard to get the documentation with broken links everywhere

     We have some issues with the documentation platform, and just reverted to the old platform (Infocenter). This has resulted in dead links, but we will fix dead links going forward.

Children
Related