Linux generated elf not working in Windows (sources not found)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User18504
Level 3
Level 3
Hello,

I am having the following problem:
I have the same code that I compile in 2 environments: Windows and Linux and I get .hex and .elf
Then I am debugging the elf file in Hightec IDE where I make a new project, the load the .elf and flash it on my Evaluation board.

The Windows generated .elf works no problem, I can flash it, start de debug, see the sources, step in the sources, set breakpoints etc
The Linux generated .elf after flashing it gives the error that it can't access the sources and I can't do anything.

Probably the problem is that in the .elf file, the source file paths are Linux specific, and then Windows can't resolve the paths or something like that, is there any way to solve this problem?
Or can I install in Linux some tool or IDE where I can load the .elf and then flash it on the Evaluation Board?

Thanks!
0 Likes
5 Replies
User18504
Level 3
Level 3
I am using the option -O3 -g3 both in Windows and Linux for generating the debug information ..., is there an additional option to generate non OS dependent source file links in the elf?
0 Likes
User18504
Level 3
Level 3
I tried in the last days all the possibilities offered by the Hightec IDE, there are some options to map the paths from the elf to some other path on your local drive, but also this doesn't seems to work.
I would expect that at least I can flash the elf on the Evaluation Board and the software would run without Debug, but after I flash it it keeps on asking for the source files, and then stops into some trap ...
0 Likes
User16286
Level 4
Level 4
First like received
You might try using relative paths instead of absolute paths.
I have not tried this personally.
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
bbogdanmircea wrote:
I tried in the last days all the possibilities offered by the Hightec IDE, there are some options to map the paths from the elf to some other path on your local drive, but also this doesn't seems to work.
I would expect that at least I can flash the elf on the Evaluation Board and the software would run without Debug, but after I flash it it keeps on asking for the source files, and then stops into some trap ...

Are you sure that your project includes a valid boot mode header? Even if it can't find the source files, it should still run.

I'm not surprised there's no way to overcome the elf path difference - I doubt mixing linux forward slashes and Windows backslashes is going to work.
0 Likes
User18504
Level 3
Level 3
This incompatibility between Linux and Windows is really annoying, especially when you have an already working setup for Linux that you want to try on an Evaluation Board that can be debugged only in Windows ...
Of course probably the setup can be replicated in Windows, but it would much easier just to be able to load the .elf file generated from Linux ...
0 Likes