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 in the presence of bootloader

Hello, guys!

We are using SDK 15.0.0 and nRF52840 SoC device.

Our goal is to debug the application with SES in the presence of bootloader. This thread explains that we need to:

  1. merge bootloader and bootloader settings .hex files into a single .hex file
  2. flash that single .hex into nRF52840 device by the help of nrfjprog tool
  3. Apply Debug->Go from SES to debug the application.

We were able to successfully finish steps 1 and 2. However, here is what we get after flashing merged .hex file into nRF52840 device:

What is flashed seems not to be equal to merged .hex file. Consequently, we are unable to debug application from SES.

Do you have any idea what we are missing here?

Here is the set of commands we apply:

## To generate bootloader settings:
nrfutil settings generate --family NRF52840 --application application.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 bootloader_settings.hex

## To merge .hex files:
mergehex --merge bootloader.hex bootloader_settings.hex --output bootloader_with_settings.hex

## To flash merged .hex file:
nrfjprog --program bootloader_with_settings.hex -f nrf52 --sectoranduicrerase 
nrfjprog --reset -f nrf52	

Thanks in advance for your time and efforts!

Sincerely,

Bojan

Parents
  • Hi ,

    Steps as follows:

    1. Generate bootloader settings hex

    2. Merge with bootloader hex to generate bootloader_with_settings.hex

    3. Merge bootloader_with_settings.hex with application hex -->

    mergehex --merge bootloader_with_settings.hex application.hex --output bl_app.hex

    4. Merge bl_app.hex with Softdevice

    mergehex --merge bl_app.hex SD.hex --output sd_bl_app.hex

    5. Erase memory

    nrfjprog –eraseall

    6. Program memory

    nrfjprog --program sd_bl_app.hex

    Let me know if this helps.

    Best,

    SK

  • Hello SK.

    Just tried to merge the .hex files the way you described. I was unable to debug, unfortunately.

    Here is how the final sd_bl_app.hex looks like when implemented in nRF52840:

    Am I missing something ?

    Regards,

    Bojan.

Reply Children
Related