This is a matter of curiosity.
I first built my project in Soft Console with debug set active. Then I built the same project on the command line in cmd using eclipse (eclipsec.exe). I did not include the -debug flag for debugging (so I assume no debug information was put in the executable). I then deleted the debug folder Soft Console made, made a new debug folder and placed my non-debug executable in it. I then opened up Soft Console and went into debug configurations..., selected my project, then went into the Startup menu and selected Load Symbols. I then debugged it using JTAG as if it was a normal debug build even though I created a program without debug info.
I am wondering why this is even possible. I did not include debug symbols in the executable. Does Soft Console transmit these debug symbols over JTAG with the Load Symbols option on? If this is the case, what is the difference between a release and debug build if the symbols are loaded anyways?
For more context, I used the Eclipse CDT tool when creating the executable. I don't know if that plays into adding debug information though when not explicitly told to add it. I also looked to see if there was a strip option (-s or -strip) like gcc provides, but I can't seem to find an equivalent (so that is why I am assuming it is produced "stripped").
CodePudding user response:
Does Soft Console transmit these debug symbols over JTAG with the Load Symbols option on?
No, they are used by gdb to know where your lines of code are, variable addresses and other information needed by the debugger and your micro is flashed with the "plain" binary executable.
Imagine that my ARM Cortex-M4 elf file is almost 10MB and micro has only 1MB of FLASH memory. Can it be loaded in full?