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

Debug application with bootloader installed

I would like to be able to leave the bootloader installed and debug an application. I have been able to use the merge tools to get the hex files all merged and generate the crc etc.. That all works. The problem is that this data is incorrect when the application changes. I don't know of a way to modify the elf file to re-calculate the crc before debugging starts. Can this be done with the nordic tools?

Also, it seems that the buttonless dfu service can't be compiled without the bootloader present. Hence the need to debug the application with the bootloader installed.

Parents
  • Hi jmag,

    Which debugger program are you using ? you don't need to combine hex file to be able to debug. Simply set break point in your application, after the bootloader switches to application you will hit the break point inside the application. In other words, the debugger doesn't need to know about the bootloader.

    If you modify the application and have trouble enterring application because of the CRC check in the bootloader, you can either make a script to generate bootloader setting (with updated CRC) and flash that or you can simply disable CRC check inside bootloader. You can enable it back after you are done with debugging.

Reply
  • Hi jmag,

    Which debugger program are you using ? you don't need to combine hex file to be able to debug. Simply set break point in your application, after the bootloader switches to application you will hit the break point inside the application. In other words, the debugger doesn't need to know about the bootloader.

    If you modify the application and have trouble enterring application because of the CRC check in the bootloader, you can either make a script to generate bootloader setting (with updated CRC) and flash that or you can simply disable CRC check inside bootloader. You can enable it back after you are done with debugging.

Children
No Data
Related