Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Download and debug application using SES while bootloader present

Hello!

I am currently developing an application for the nrf52832 using Segger Embedded Studio as my IDE.

The application is not utilizing any softdevice but I would like to do updates using ble dfu which depends on s132 softdevice. While the application on its own is running fine it is causing some problems when bootloader and softdevice are present. I would like to debug those problems using SES but when downloading the application to the device it won't go past the bootloader. (When doing a dfu update using the nrf Toolbox App I do not run into this problem)

I tried adding the Bootloader settings file generated using nrfutil as "Additional Load File" but with no success.

So my question is: How can I download and debug an application using SES while bootloader and softdevice are already present on the device?

Are there other methods/tools for debugging I should be using instead?

Thank you for you help,

Julian

Parents
  • Hi Julian, 

     

    I would suggest you test the bootloader setting hex you generate using nrftuil separately, instead of adding it as Additional Load File. Note that the hex file of the application have to be the same hex that you used to generate the bootoader setting. 

    Also please test with a simple blinky example first. 

     

    You can have a look at my guide here at appendix 1.  

  • Hi Hung,

    Thanks for your reply.

    When mergehex-ing the bootloader and the bootloader_setting.hex generated using nrfutil I can flash it on the device and run the application. Sadly when trying to flash the merged hexfile as additional Loadfile SES is reporting the following error: "The 0x10001014 - 0x1000101B load section does not fit the target description".

    As I have stated above I am interested in using SES' integrated visual debug functionality.

    I am able to download the application using SES whithout specifying an Additional Loadfile but after this the application will not launch because the bootloader is not aware of its presence.

  • I'm not very clear on why do you need to put the hex file to "additional loadfile" ?

    You should be able to debug without that. You just need to run nrfjprog  to program the merged bootloader+bootloader setting. After that you flash the application from SES. 

    Note that the bootloader setting have to be generated with the application hex you planing to use. So if you flashed the bootloader setting and then you modify the application, the CRC of the application image won't match with what in the bootloader setting. 

    You get the error "does not fit the target description" most likely because the UICR page is outside of the flash configuration for the chip. You may need to add the segment of the UICR into the flash_placement.xml , similar to what we have in our bootloader project. 

     

  • Ah now I got what you meant.

    This is working for me, Thank you!

    This leads me to another question: Is there a way to execute custom scripts while building in SES so I can automate the bootloader_setting creation?

Reply Children
No Data
Related