[U-Boot-Users] Debugging U-Boot on 440GP

Scott McNutt ScottM at Orbacom.com
Tue Nov 25 18:16:49 CET 2003


It's been a while since I tested this, but...

> I have a BDI2000 and a custom target board.  I am can
> successfully connect to it and step through single instructions.
> I can also set a breakpoint at _start_440, but any breakpoints
> after that do not get noticed.  I have the BDI setup for HARD
> breakpoints.  Should I have it setup for SOFT instead?

The debug control/status registers need to be setup. By default the
startup code in cpu/ppc4xx/start.S clears the dbcr registers, so
debug events are disable. The hw debuggers I've used need an
event to establish control. If CFG_INIT_DBCR is defined, the
dbcr0 is setup with the macro value (see start.S). To set the
macro you can do one of the following:

Define CFG_INIT_DBCR in your config header to the value you

Or, if you copied board/ebony/config.mk for your custom
board you can simply:

$ touch cpu/ppc4xx/start.S
$ make dbcr=1

This defines CFG_INIT_DBCR=0x8cff0000 -- which should give
you all events.

> What I am seeing is that when I stop the CPU, it's either at 0x700
> or 0x1400 -- both of which are defined in the kgdb.c file, but I don't
> know what they mean.  Can anyone shed any light on the situation
> for me?

0x700 is program check -- bad opcode? ;-)
0x1400 is data tlb exception -- you might want to check your tlbtab
to make sure it's correct.


More information about the U-Boot mailing list