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
  • I am using Atollic (eclipse). The reason for the post was to avoid jumping through the hoops of having to change either the bootloader or the application every time. When the bootloader is installed and you try to run the application, it never gets to main because the CRC check fails. Seems there should be an easier way to do this. Based on your comments, it looks like the best way would be to create a new bootloader which doesn't check the CRC, and use that only during debug.

Reply
  • I am using Atollic (eclipse). The reason for the post was to avoid jumping through the hoops of having to change either the bootloader or the application every time. When the bootloader is installed and you try to run the application, it never gets to main because the CRC check fails. Seems there should be an easier way to do this. Based on your comments, it looks like the best way would be to create a new bootloader which doesn't check the CRC, and use that only during debug.

Children
  • @jmag: Yes, the easiest is to disable CRC check on the bootloader. I'm not so sure about Eclipse, but in most IDE you can set up an additional load file, that you can flash inaddition to the current application hex. You can set up the bootloader setting hex file to update the CRC inside the bootloader setting. But this option requires a script to run to create the bootloader setting hex.

Related