cancel
Showing results for 
Search instead for 
Did you mean: 

when debugging i get Launch Terminated: "ELF file does not contain any .text section."

sde c.1
Senior II

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)

 

5 REPLIES 5
Andrew Neil
Evangelist III

So it thinks your ELF file has no code in it!

Did you successfully build before trying to debug?

 

Building is no problem, no error or warnings. It fails once i press the debug button that makes contact with ST-LINK/V2

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?

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..

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 ...