cancel
Showing results for 
Search instead for 
Did you mean: 

"No source available for "main() at 0x8001a14" " while debugging

eben .11
Associate II

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.


_legacyfs_online_stmicro_images_0693W00000binrpQAA.png

1 ACCEPTED SOLUTION

Accepted Solutions
eben .11
Associate II

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

View solution in original post

5 REPLIES 5

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?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
eben .11
Associate II

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

Remy ISSALYS
ST Employee

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

eben .11
Associate II

Thank you all for your time

Rim LANDOLSI
ST Employee

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:

  • Debug --> Optimization off -O0
  • Release --> Optimize for size -Os

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