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

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



Ralf Corsepius wrote:
> 
> Radzislaw Galler wrote:
> >
[...]
> >
> > rtems_task Init(
> >     rtems_task_argument ignored
> >     )
> > {
> >     writew(PFC_PEIOR,0xFFFF);
> 
> Setting up hardware in Init is too late in many cases and is
> definitely wrong from a portability point of view.
> 
> Things like these should better go to your BSP's start.S/hw_init.c,
> bspstart.c (preferred if possible), to your ROMed startup code
> (Sometimes required, eg. to setup the SH's memory areas) or in case
> you need to set up periperials, to a device drivers *_init function
> (allows dynamical configuration).

I just tried to turn off some LED to check if the program runs. I don't
want a driver for that :^)

> > ~/prog/projects/rtems/tests/hello$ sh-rtemself-gdb o-debug/hello.exe
> > GNU gdb 5.0
> > Copyright 2000 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> > ar
> > welcome to change it and/or distribute copies of it under certain
> > condition
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for
> > details.
> > This GDB was configured as "--host=i586-pc-linux-gnu
> > --target=sh-rtemself"...
> 
> sh-rtemself with gcc-2.95.2 is known to have a lot of problems,
> which is why the defaults for gensh1 and gensh2 still are sh-rtems
> (== coff). But YMMV, and it would be nice to hear success stories :)
> 
> > (no debugging symbols found)...
> 
> Normally, this indicates that -g had not been used during
> compilation. By default, -g is used when compiling RTEMS (even with
> the optimized version), so I don't know what is happening.

> > ~/prog/projects/rtems/tests/hello$ sh-rtemself-gdb o-debug/hello.exe
The debug symbols ARE included. Looks like it's the problem with
'sh-rtemself-' target.
I'll try pure 'sh-rtems-'

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


Regards

Radek

P.S. I don't need CC to my address - I'm member of the list.