[U-Boot-Users] Re: emulate u-boot in gdb

Detlev Zundel dzu at denx.de
Sat Oct 30 16:15:15 CEST 2004


Hi Luc,

> I am looking into SkyEye and busy in creating an extension for
> potentially ipaq (cheap finished hardware to play with for embedded
> software/ui development).
>
> How can I debug a boot loader such as u-boot in a emulator/simulator
> environment ?

Good question.  I have only thought for a short while about this
question, but I think in such an environment, you need only small
pieces of U-Boot.  Of course you don't have real hardware to setup in
a debugger (so I guess, but I have never used one) things like
setting up a memory controller etc. will probably not work without
emulating all of the hardware of a "real system" - and I guess this is
simply not possible to have emulators for all hardware components.

So what you would need for such an environment would be U-Boot
stripped from all the hardware inits which is probably a major surgery
on the sources.

Try asking on the U-Boot mailing list (I cc'ed the list) as there are
_very probably_ more competent people in this field.

> Is it possible to debug u-boot in a arm-linux-gdb environment ? If I
> assign this to memory 0x000000 and put 'set $pc =0' should that work
> ? ... it didn't when I tried

It is of course possible to debug U-Boot on ARM systems - we did ports
for some ARM based boards - but again putting U-Boot at address 0 is a
much bigger question.  What board config did you use?  What address
does this image think it runs from?  And what address was U-Boot
linked for?  You have to load the U-Boot image there - but again I
think the U-Boot hardware inits will cause you grief.

> I searched the web but could not find any good result. Can give me
> some direction ?

I hope I did ;)

Cheers
  Detlev

-- 
;; Self-replicator in ELisp
((lambda (l) (prin1-to-string (list l (list (quote quote) l))))
 (quote (lambda (l) (prin1-to-string (list l (list (quote quote) l))))))




More information about the U-Boot mailing list