[U-Boot] U-Boot timer example crashes on EP88xC
Detlev Zundel
dzu at denx.de
Wed Jun 24 18:16:50 CEST 2009
Hi Mikhail,
>> When I use objdump to deassemble the object file, it seems
>> that "timer" is at 40108. Try "go 0x40108" and read the FAQ[1] ;)
>>
>> Cheers
>> Detlev
>>
>> [1] http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
>>
>>
>
> "go 0x40108" did it, thanks! And thanks for the FAQ reference, knowing
> this will be definitely useful in the future.
>
> Why does the documentation say to use 0x40004?
The documentation _was_ correct at some point in time. Obviously the
situation changed.
The "real" problem is that we currently do not exactly specify the
memory layout for the examples elf files. To be deterministic we would
need to have a linker script which puts the intended function onto the
correct offset. This has not been done and with previous toolchains the
examples worked (more or less) like expected.
Obviously nobody used the timer example recently ;)
> I have not made any changes to the timer program, is it different
> because the example uses the SREC version of the file and I'm using
> the binary?
No this is not a problem - as mentioned above it is the contents of the
elf file which is "not according to expectation".
For the fun of it you could try to come up with a linker script for
powerpc also. This should get at least the text segment at the intended
place. How to order functions in there I'm not so sure. Maybe use
attributes to define a specific text segment at the beginning and then
mark the "main" function with this attribute.
You're welcome to play here ;)
Cheers
Detlev
--
Indeed, the author firmly believes that the best serious work is also
good fun. We needn't apologize if we enjoy doing research.
-- Donald Knuth
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
More information about the U-Boot
mailing list