2024-08-07 02:28 AM - last edited on 2024-08-07 02:36 AM by Andrew Neil
The past few days I have encountered erratic behavior where this message often appears when trying to debug a board:
"
Launch Terminated:
The ELF file does not contain any .text section. Either manually enter the offset for the ELF file in the launch configuration or disable symbol loading for the ELF file.
"
It's strange that I can't find any information about this on the internet or this forum. This is a serious problem that prevents me from debugging further. I did not change any compiler, linker or build configuration settings and am hesitant to download the newer IDE version due to a watch bug where I can't reliably see variable values.
What can I do to solve this?
Thank you.
i use
Version: 1.13.2
Build: 18220_20230914_1601 (UTC)
2024-08-07 02:39 AM
So it thinks your ELF file has no code in it!
Did you successfully build before trying to debug?
2024-08-07 02:48 AM
Building is no problem, no error or warnings. It fails once i press the debug button that makes contact with ST-LINK/V2
2024-08-07 02:56 AM - edited 2024-08-07 02:59 AM
Have you tried a Clean & rebuild?
can you debug any other projects?
Is your Debug Config pointing to the correct ELF file?
Added:
What does the linker listing ("map file") show?
Are you using a custom linker script?
2024-08-07 04:15 AM
I tried Clean & rebuild before with no success, i can debug other projects, correct ELF file was used in Debug Config.
After Clean & rebuild this time it started working again. Thats why i said erratic behavior ...
I will follow this up in the future and post a solution once i got a clue whats going on..
2024-08-07 04:25 AM
Good that it's working again for now ... 👍
Might be worth saving your working ELF & map files for comparison if this happens again.
Also try feeding the ELF into objdump and see what that makes of it ...
2024-08-21 04:44 AM
Deleting the debug configuration and creating a new one seems to solve the issue in another project. I believe it has something to do with renaming the project, though I can't pinpoint the exact cause. The STM32CubeIDE software engineers could consider automatically deleting any configurations after renaming the project to prevent this error.