How to solve the error "No source available for main() at ..." encountered while debugging ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-26 04:54 AM
Hi everyone,
I have been trying to debug my project, the moment I select the debug option, the window appears which shows the message "No source available for main() at ---- "
What does this mean? How to reolve this issue?
Looking forward to the help.
Thanks in advance.
BR
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
-
STM32L4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-27 09:29 AM
What address is it reporting? Present failure context better, perhaps with a screen shot, or more complete diagnostic output.
It is possible to build objects/executables which lack debug info, or file/line level address attribution.
Perhaps to a listing/disassembly and find the offending code/context from that.
If 0x1FFFxxxx type address, it would suggest BOOT0 in High/Floating and ROM execution is occurring.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-27 02:12 AM
Hello @WKhan.2 ,
Can you please provide more details on your environment used in order to analyze this issue and help you.
Which device are you using? Which software release used ?
What do you expect exaclty as project?
Are you using a particular Cube example? If yes, which one?
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-27 02:44 AM
Hi @Imen DAHMEN , thanks for the reply.
I have been using STM32CubeIDE for developing and debugging the project.
The device I am using is embedded STM32L452RE with release of STM32CubeIDE is 1.6.0.
I am debugging it with ST-Link.
I am not running the Cube example, I am developing a firmware having different included libraries.
My expectation is that when we run the Cube example or write the simple code in main.c on normal evaluation baord and start debugging it debugs normally, it should also work like that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-27 09:15 AM
Hi @WKhan.2 ,
You should check your debug configuration settings (Optimization Level, and Debug Level). For that, I advise you to check this post it may help you.
Also, have a look at this article in the debug section: How to make sure the STM32 starts properly in our design?
Please keep us updated about your progress on this issue.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-27 09:29 AM
What address is it reporting? Present failure context better, perhaps with a screen shot, or more complete diagnostic output.
It is possible to build objects/executables which lack debug info, or file/line level address attribution.
Perhaps to a listing/disassembly and find the offending code/context from that.
If 0x1FFFxxxx type address, it would suggest BOOT0 in High/Floating and ROM execution is occurring.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-10-27 07:22 AM
Thanks for the help, the issue was resolved.