public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot timer example crashes on EP88xC
Date: Wed, 24 Jun 2009 18:16:50 +0200	[thread overview]
Message-ID: <m2ljnhfvyl.fsf@ohwell.denx.de> (raw)
In-Reply-To: <4A423480.7070702@shoppertrak.com> (Mikhail Zaturenskiy's message of "Wed, 24 Jun 2009 09:13:20 -0500")

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

      reply	other threads:[~2009-06-24 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 22:18 [U-Boot] U-Boot timer example crashes on EP88xC Mikhail Zaturenskiy
2009-06-24 13:26 ` Detlev Zundel
2009-06-24 14:13   ` Mikhail Zaturenskiy
2009-06-24 16:16     ` Detlev Zundel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ljnhfvyl.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox