2023-04-25 09:52 AM - edited 2023-11-20 07:09 AM
I am trying to debug a sample project from st website and but it is stuck in the first line of main (assembly ) meanwhile when I flash the .hex with cube programmer , the project works perfectly. So I assume that it's a problem with the debugger.
I made sure that he's selecting the correct .elf file but still not working
I did respect all the readme steps.
Solved! Go to Solution.
2023-04-26 01:54 AM
well I figured that he was working with the release build instead of the the debug build. I still do not know the difference between the two of them but it's working with the debug one
2023-04-25 03:48 PM
Not really clear on the part or the context, or errors it had when starting the debugger.
Looks like it can't associate source files, so perhaps wrong meta-data in .ELF file.
Is it a part with multi-cores, or some kind of loader application in the front of the Flash?
2023-04-26 01:54 AM
well I figured that he was working with the release build instead of the the debug build. I still do not know the difference between the two of them but it's working with the debug one
2023-04-26 02:19 AM
Hello,
Indeed, you are right, you should use the debug build. The default options available are Debug (a build with debug symbols, and optimizations turned off), and Release (a build with optimizations ON and no debug symbols).
Best Regards
2023-04-26 02:25 AM
Thank you all for your time
2023-04-26 03:57 AM
Hello @eben .1 and welcome to the community,
The difference is in the compiler settings. In fact, debug and Release are created by default with the default optimization levels in GCC for the configurations:
The Debug configuration makes the project built with debug information and without any optimization. The Release configuration makes the project optimized for smaller code size and with no debug information. By default, the Debug configuration is set as the active build configuration when the project is created.
I wish this answer helps you.
Thanks,
Rim
2024-10-02 11:22 AM - edited 2024-10-02 11:23 AM