How to say 'hello' on EVB7045F? (gensh2)
Ralf Corsepius
corsepiu at faw.uni-ulm.de
Sat Jan 6 13:40:15 UTC 2001
Joel Sherrill wrote:
>
> Radzislaw Galler wrote:
> >
>
> > The debug symbols ARE included. Looks like it's the problem with
> > 'sh-rtemself-' target.
> > I'll try pure 'sh-rtems-'
>
> Coff seems to be more stable/reliable with the sh but ...
shelf had severe problems with *rels.
> > > > 2. There are some sections loaded at address 0x0 which is unaccesible on
> > > > this EVB (RAM starts from 0x400000). The sections overlap each other.
> > > I think you are just being fooled by the debugger's messages. The
> > > debug sections normally do not get downloaded to the target, but
> > > stay on the host.
> >
> > No. They are loaded. I checked it with 'set debug remote 1' (gdb 5.0).
> >
> > Seems like it is the problrm with the target configuration. Even the
> > size reported by sh-rtemself-size is incredible:
> >
> > /usr/local/bin/sh-rtemself-size o-debug/hello.exe
> > text data bss dec hex filename
> > 252176 5488 5144 262808 40298 o-debug/hello.exe
> >
> > It shouldn't be so large. Looks like the sections are messed up.
>
> This is not necessarily too big when you consider that the
> compilation level is probably -O0 and all static inlined routines
> are possibly duplicated in each .o.
:)
Does this look better (gensh2)?
# sh-rtemself-size o-debug/hello.exe
text data bss dec hex filename
83508 3376 5544 92428 1690c o-debug/hello.exe
(gdb) load o-debug/hello.exe
Loading section .text, size 0x1395c vma 0x444000
Loading section .rodata, size 0xcd8 vma 0x45795c
Loading section .data, size 0xd2c vma 0x4586b4
Loading section .stack, size 0x4 vma 0xfffffec0
Start address 0x444000
Solution: Change the output format in linkcmds to elf32-sh:
--- c/src/lib/libbsp/sh/gensh2/startup/linkcmds 1999/11/18
21:22:57 1.1
+++ c/src/lib/libbsp/sh/gensh2/startup/linkcmds 2001/01/06 13:36:33
@@ -40,7 +40,7 @@
* $Id: linkcmds,v 1.1 1999/11/18 21:22:57 joel Exp $
*/
-OUTPUT_FORMAT("coff-sh")
+OUTPUT_FORMAT("elf32-sh", "elf32-sh", "elf32-sh")
OUTPUT_ARCH(sh)
ENTRY(_start)
>
> > Regards
> >
> > Radek
> >
> > P.S. I don't need CC to my address - I'm member of the list.
I prefer CC:-ing, because lists are slow and unreliable. For
fruitful discussions and quick problem solutions, lists often are
too slow.
Anyway, ...
Ralf
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu at faw.uni-ulm.de FAX: +49/731/501-999
http://www.faw.uni-ulm.de
More information about the users
mailing list