[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to say 'hello' on EVB7045F? (gensh2)



Ralf Corsepius wrote:
> 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

Now with prebuild tools I've got:

/opt/rtems/bin/sh-rtems-size o-debug/hello.exe
   text	   data	    bss	    dec	    hex	filename
  77200	   2944	   5404	  85548	  14e2c	o-debug/hello.exe

(gdb) load o-debug/hello.exe 
Loading section .text, size 0x12d80 lma 0x444000
Loading section .data, size 0xb80 lma 0x456d80
Loading section .stack, size 0x10 lma 0xfffffec0
Start address 0x444000 , load size 80144

As you can see the sections problem is fixed, but there's .rodata
missing.
And the LED still doesn't go out...

>
> 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)
 
I did that, but gdb crashed saying something about unrecognized
architecture sh4 (?!), so I decided to install prebuild toolset.

Could you tell me what versions of build tools do you use and 
what kind of monitor do you have on your EVB?
Have you succeed running some application? How?

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

OK. Seems reasonable. I'll do it too.

Radek