If having a boot loader running on a micro-controller, it is very useful if both the boot loader and the loaded application can be debugged together:
So how to make this work?
First have the boot loader flashed and have it loaded an application (see https://mcuoneclipse.com/2019/10/06/linking-bootloader-applications-with-eclipse-and-freemarker-scripts/).
Then have in the application project a debug launch configuration created (I’m using a J-Link here):
The trick is to configure this launch so it does not flash/overwrite anything on the target and does an ‘attach’ instead:
To prevent writing a new binary, make sure ‘Load image’ is unchecked and ‘Load Symbols’ for the application is checked:
Finally, load the extra symbols of the boot loader itself:
💡 If I have more parts for which I want the debug symbols, I can use the ‘+’ and add more files.
With this, I have source level debugging for both the boot loader *and* the application 🙂
Happy Bootloading 🙂






Hello Erich,
I was EXACTLY wondering if there was such an article on MCUonEclipse.
Out of curiosity, how would you debug THREE executables? I am thinking of a boot manager, a bootloader and an application, for example. Assuming non-overlapping sessions (but also overlapping) I would merge the hex files, but I don’t know if this approach would be feasibile with elf files.
K.R.
Luca
LikeLike
Hi Luca,
see that image ‘Load other symbols’: here you can add as many files as you need.
LikeLike
Hello, i have bootloader and my application. After flash bootloader i want to flash and debug my application only. Is it possible? thanks so much.
LikeLike
Yes, this is possible with the approach presented in this article.
LikeLike
I think the question was about whether it is possible to launch debugger and provide it with signed application and symbols somehow. In this approach debugger writes into partition and once bootloader finishes you can stop at the breakpoint in the application. This way you don’t need to attach.
LikeLike
Yes, this is possible. It depends somewhat on the debug probe used, as some perform an erase on sectors. If the load keeps the bootloader, you can simply add loading the application and then debug it. For the resident bootloader use the ‘symbols’ to debug it.
LikeLike