Symbols issue (AT91SAM7SE + Yagarto 3.3.1+ Jlink GDB server)

All design tool related questions: compiler, assembler, linker. Embedded programming questions: assembler, C code.

Moderator: nferre

jdumas
Posts: 6
Joined: Fri Jan 18, 2008 12:58 pm

Symbols issue (AT91SAM7SE + Yagarto 3.3.1+ Jlink GDB server)

Thu Jan 31, 2008 6:42 pm

Hello All
I'm having some issues to debug a small project based on Yagarto Eclipse
3.3.1.1 with AT91SAM7SE512.

The project compiles fine for both FLASH and SRAM targets.
I'm now trying to debug the FLASH version and I get the following errors
:

- I commented the -Oo section in the makefile to allow debug
- I launch the Jlink GDB server > OK
- I created a debug config (from the Zylin embeeded native) pointing to
myproject_flash.elf, arm-elf-gdb.exe
in the init/command section I have set
target remote localhost:2331
monitor reset 1
- I launch the debug configuration created as described above.
The console mentions
target remote localhost:2331
0x10361000 in ?? ()
monitor reset 1
Resetting target (halt with breakpoint @ address 0)
- The program is now suspended, I hit the "resume" button to start
debbuging but when I pause the debugger I have the following error :

- Thread [0] (Suspended: Signal 'SIGTRAP' received. Description:
Trace/breakpoint trap.)
1 <symbol is not available> 0x40241000

So it seems there are no symbol available for debugging my project !
If somebody can explain me what I'm missing !?
Any help would be greatly appreciated since I'm now stuck on this issue!

I've tried to follow the 198 pages tutorial to successfuly use GCC with
ATMEL AT91, but the yagarto version described in this document is
different than mine, and it seems symbols are no more available in the
main.out file but now embeeded into the ELF file ?

Please help I'm a AT91 newbie !
Thanks to all
trampas
Posts: 18
Joined: Thu Oct 25, 2007 4:34 pm

Thu Feb 07, 2008 10:19 pm

I am in similar boat.

I got the James Lynch paper and his example works. Thus I was taking my code and migrating into his make file and such. However Eclipse locked up with a note saying it was "rebuilding workspace." After which Eclipse no longer functions, even after reboot, reinstall, etc.

I have contacted the Atmel FAE but got no response, of course they will not help with anything.

Thus the AT91SAM7S is great device but I hate to spend $5k for compiler/debugger for a $5 part.

Trampas
smith_se
Location: Everett, WA
Posts: 12
Joined: Fri Nov 02, 2007 6:48 pm

Sat Mar 01, 2008 12:59 am

This is exactly the same problem I have in my post (phpbb/viewtopic.php?t=4192).

It seems that there are several of us out there who started on Lynch's tutorial and then migrated to elf files and ended up with symbol/source file problems while debugging.

It doesn't seem to be such a difficult issue - everything works except it seems that the source files aren't being found by arm-elf-gdb and for several days I've been trying to find out why.

Has anyone solved this problem?
roboknight
Posts: 3
Joined: Tue Oct 26, 2010 5:39 pm

Re: Symbols issue (AT91SAM7SE + Yagarto 3.3.1+ Jlink GDB server)

Tue Oct 26, 2010 5:57 pm

Its most likely a matter of gcc not outputting the correct symbol info. Whenever you use -O0 or anything other than -O2, there is always a chance gcc will muck it up. This has been a long standing issue with GCC (ever since I've been using it... starting around '95)... The answer always seemed to be "Don't use anything other than -O2. It works fine with symbols, so go ahead and use it. You wouldn't want unoptimized code anyway." Well, that was pretty much the answer anyway. It doesn't seem to have improved in 15 years.

There are people out there who can probably fix it, but I think the real issue is that the optimization levels don't get tested for every backend/frontend combo that the compiler supports. GCC/ARM should probably be more heavily tested, but it still has issues.

I'm not using the AT91, but I've been trying to use the Yagarto toolchain for an STR712 and I was getting the same results till I switched to -O2. Unfortunately, this also produces a potentially strange execution path.

I have not found a solution for using -O0 or -Oo or -Oanything-other-than-2 ... If anyone can point to a solution, I'd really appreciate it. Its much more difficult to debug with -O2 than with no optimization.
smith_se
Location: Everett, WA
Posts: 12
Joined: Fri Nov 02, 2007 6:48 pm

Re: Symbols issue (AT91SAM7SE + Yagarto 3.3.1+ Jlink GDB server)

Tue Oct 26, 2010 8:40 pm

I never did find a solution to this, except to use a different debugger. Noicedebugger for ARM turned out to work nicely, and for a little $ helped to get things moving along quickly and with good functionality.

I've been using the Yagarto package with AT91 and LPC ARM7 processors and it works fine, even with some seriously big projects, but so long as you shop elsewhere for the debugger component.
roboknight
Posts: 3
Joined: Tue Oct 26, 2010 5:39 pm

Re: Symbols issue (AT91SAM7SE + Yagarto 3.3.1+ Jlink GDB server)

Tue May 10, 2011 2:39 pm

I think I finally fixed this by using a toolchain compiled for cygwin (in my case). The yagarto toolchain I was using couldn't find my source files because cygwin uses forward slashes instead of backslashes for filenames (at least it appeared that way). I think this interfered with finding debugging symbols at times also (maybe the compiler was also generating a different EABI version as the one I am using now uses EABI version 0). But Yagarto was built for DOS. Crossing these two never does work well. It appears that the install bu-2.17_gcc-4.1.1-c-c++_nl-1.14.0_gi-6.5.exe does the job, no matter which compiler optimization I use. At any rate, it seems to work for the STR712. It might also work for the AT91SAM7SE. Unless of course you are using Linux. In which case, cygwin would not be an issue, but maybe EABI version would?
roboknight
Posts: 3
Joined: Tue Oct 26, 2010 5:39 pm

Re: Symbols issue (AT91SAM7SE + Yagarto 3.3.1+ Jlink GDB server)

Tue May 10, 2011 2:39 pm

I think I finally fixed this by using a toolchain compiled for cygwin (in my case). The yagarto toolchain I was using couldn't find my source files because cygwin uses forward slashes instead of backslashes for filenames (at least it appeared that way). I think this interfered with finding debugging symbols at times also (maybe the compiler was also generating a different EABI version as the one I am using now uses EABI version 0). But Yagarto was built for DOS. Crossing these two never does work well. It appears that the install bu-2.17_gcc-4.1.1-c-c++_nl-1.14.0_gi-6.5.exe does the job, no matter which compiler optimization I use. At any rate, it seems to work for the STR712. It might also work for the AT91SAM7SE. Unless of course you are using Linux. In which case, cygwin would not be an issue, but maybe EABI version would?

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 5 guests