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

Hi!
I have a little problem with debugging when using a BDI2000 JTAG-debugger.
Currently I try to port U-Boot to a self-designed board, based on an PPC 603e-processor. 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. It is the same with the hardware-breakpoints. Here the steps i did:
My Flash-memory starts at Address 0xff800000 and there I load the U-Boot image. 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'. Calling the 'continue'-command in GDB results in an error like that: 'Cannot insert breakpoint -2.' 'Error accessing memory address 0xff800100: Unknown error 4294967295'
Does anyone have experiences in BDI2000-debugging and can tell me how he/she solved the breakpoint-problems?
Thanks, Sebastian Häpe

In message 2D9AB865A49FD511914700105A0EF67901C6F15B@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
participants (2)
-
"Häpe, Sebastian, HRD/AB"
-
Wolfgang Denk