[U-Boot-Users] Debugging U-Boot using BDI2000

Wolfgang Denk wd at denx.de
Mon Feb 7 11:10:22 CET 2005


In message <2D9AB865A49FD511914700105A0EF67901C6F15B at morse.smart.lfk.eads.net> you wrote:
> 
> When I start U-Boot from Flash-memory using the BDI2000 it is impossible to
> set any software-breakpoints, this means I _can_ set the breakpoints, but
> when I start the code, the debugger does not stop there.

You cannot set any software breakpoint when running  from  flash  (or
any  other  ROM). Setting a software breakpoint means to write a trap
instuction  at  the  breakpoint  address,  and  since  flash  is  not
writable, this cannot work.

You have to use hardware breakpoints.

> It is the same with the hardware-breakpoints. Here the steps i did:

No. HW breakpoints work just fine.

> My Flash-memory starts at Address 0xff800000 and there I load the U-Boot
> image.

Did you inclkude instructions in your BDI config file  to  initialize
the memory controller to map it at this address?

> Then I tell the BDI2000 via the 'TI 0xff800100' command to start U-Boot.
> After that step the PC stands at 0xff800104 and I start the GDB and connect
> to the BDI using the command 'target remote bdi:2001'.
> If after that I set a breakpoint at address 0xff800148 (sync-command) with
> 'BI 0xff800148' the BDI says:
> 'Breakpoint identification 0'.

You have to decide what you want - do you want to use GDB  (then  you
have  to use GDB to set the breakpoint), or the BDI's telnet inteface
(then don't expect GDB to be useful). 

> Does anyone have experiences in BDI2000-debugging and can tell me how he/she
> solved the breakpoint-problems?

Just use one debug interface consistently - either GDB, or  BDI,  but
don't  mix  both  (at  least  not unless you know exactly what you're
doing).

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Knowledge, sir, should be free to all!
	-- Harry Mudd, "I, Mudd", stardate 4513.3




More information about the U-Boot mailing list