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