[uClibc]Re: Memory Map Hermit vs ice_boot?

Mike Touloumtzis miket at bluemug.com
Mon Jul 29 22:20:52 UTC 2002


On Sat, Jul 27, 2002 at 11:33:42AM +0530, Trilok wrote:
> Hi, 
> I have successfully created ARM Linux Toolchain for CDB89712 Rev
> B, board. I have refered instructions from Roland Seuhs' page for
> porting. So I have used Hermit and ShoeHorn. Now I want to develop
> simple ledblink program. But this program gives me memory fault when I
> had executed it on CDB89712 Target.

Ummm... what OS or loader are you using to load this application?
That will define the memory map, not Hermit (Hermit doesn't set up any
memory translation IIRC and it doesn't have an application loader for
anything but itself and the Linux kernel).

> Then I have statically linked this program using uClibc. I have
> attached Makefile and ledblink.c with this e-mail . But what I am
> thinking is Do I required entry.S and Init.s which you are using when
> compilation of hermit?.

If you want to run anything other than Linux under Hermit you will need
to link it into Hermit or write a loader for it.  The minimum you need
to do to run a C program on bare metal:

-- make sure its .text, .data, and .bss are in the right locations and
   properly initialized,
-- give it a stack, and
-- branch to its entry point.

Loading an ELF binary correctly is somewhat more involved.

> Well please send me the Memory Map generated by hermit on chip. I am
> sending you memory map generated by ice_boot for your reference.

I have never used the CDB89712 so I can't help you there.

You can figure out the memory map for Hermit in EDB7211 (the target I
wrote) by looking at the linker scripts loader.lds.* (there are several
possible configurations) and by examining entry.c, which relocates Hermit
itself into RAM.  The Makefile also leaves the link map around (look for
*.map).

miket



More information about the uClibc mailing list