[U-Boot-Users] Debugging u-boot with BDI2000

Hello Wolfgang,
I'm trying to debug my u-boot with BDI. It's a 405GP based system. In the telnet sessoin I can insert "reset run" and u-boot starts. When I enter "reset halt" and then "go" it won't do anything. I have tried with ddd
What do you mean with "it won't do anything"? Who won't do anything? The BDI2000? The CPU? What makes you think the CPU does not do anything?
At first I thought the 405GP cpu does not start. On my card is a LED display, so I can output some numbers very early in the startup process. With "reset halt", "go" the display never change its contents, with "reset run" it does.
Are you sure your BDI2000 config file is OK for your board?
Good question. What should happen, to be shure? I have debugged a running Linux kernel with this configuration. So I think(!) the major settings are ok.
How did you configure "RESET type" and "STARTUP mode"? Is your "START address" ok?
RESET is not set, defaults to "SYSTEM" STARTUP is set to RESET START is set to 0x0000'0000 (readed from a default file)
With "reset halt", "info" I see the CPU waiting at address 0xFFFF'FFFC, after one single step ("ti") it waits at address 0xFFFF'C0100. Seems ok.
When I step the mtmsr instruction ddd shows address 0x700, and the esr register has 0x8800'0000 (illegal instruction occured?????). Same when I place a breakpoint behind the mtmsr instruction und use "cont" instead of "stepi".
You are aware that you cannot single step through certain instructions, aren't you?
If the mtmsr instruction is not "single step able", it should run, if I place a breakpoint behind this instruction (for example later in the C routines) and use "go" to run up the breakpoint. Or not?
What is the difference between "reset run" and "reset halt", "go"?
"reset run" and "reset halt" change the startup mode to "run" and "halt", respectively. "go" sets the PC and starts the target system. Ummm.. is there any specific part where the BDI2000 manual is unclear about this?
Perhaps my english is very bad. Question was: Why the cpu is running normal with "reset run", and did not run, when I enter "reset halt", enter a breakpoint and than "go" (it never reaches the breakpoint).
-- JB

Hi,
in message 200307181321.29058.jbeisert@eurodsn.de you wrote:
With "reset halt", "info" I see the CPU waiting at address 0xFFFF'FFFC, after one single step ("ti") it waits at address 0xFFFF'C0100. Seems ok.
Indeed, this looks OK.
BTW: plain "reset" is all you need. You don't have to specify a new mode if you don't want to change it.
If the mtmsr instruction is not "single step able", it should run, if I place a breakpoint behind this instruction (for example later in the C routines) and use "go" to run up the breakpoint. Or not?
Maybe. If you're using hardware breakpoints, for example.
Perhaps my english is very bad. Question was: Why the cpu is running normal with "reset run", and did not run, when I enter "reset halt", enter a breakpoint and than "go" (it never reaches the breakpoint).
Which address is PC pointing to when you enter "go"?
You may want to ask Abatron support for details about the exactl meaning of these options. My interpretation is that "reset run" means the same as a reset in startup mode run, while "reset halt" equivalents to a reset in startup mode stop. I never used any of these.
Why don't you use plain "reset" ? [Did you try it?]
Best regards,
Wolfgang Denk

Am Freitag, 18. Juli 2003 14:05 schrieb Wolfgang Denk:
If the mtmsr instruction is not "single step able", it should run, if I place a breakpoint behind this instruction (for example later in the C routines) and use "go" to run up the breakpoint. Or not?
Maybe. If you're using hardware breakpoints, for example.
I did use hardware breakpoints.
Perhaps my english is very bad. Question was: Why the cpu is running normal with "reset run", and did not run, when I enter "reset halt", enter a breakpoint and than "go" (it never reaches the breakpoint).
Which address is PC pointing to when you enter "go"?
0x700. It wants to handle an exeption (but at this point, there is no code present). So it hangs forever.
You may want to ask Abatron support for details about the exactl meaning of these options. My interpretation is that "reset run" means the same as a reset in startup mode run, while "reset halt" equivalents to a reset in startup mode stop. I never used any of these.
Why don't you use plain "reset" ? [Did you try it?]
My u-boot implementation hangs at a very late position. So I have to place a breakpoint before the point it hangs (to see what happens before the hang). But with "reset run" the breakpoint is lost....And with "reset halt", setting a breakpoint and "go" it hangs after a few instructions...Aaargh.
Thanks for your answers
-- JB

Dear Jürgen,
in message 200307181428.20714.jbeisert@eurodsn.de you wrote:
I did use hardware breakpoints.
OK.
Perhaps my english is very bad. Question was: Why the cpu is running normal with "reset run", and did not run, when I enter "reset halt", enter a breakpoint and than "go" (it never reaches the breakpoint).
Which address is PC pointing to when you enter "go"?
0x700. It wants to handle an exeption (but at this point, there is no code present). So it hangs forever.
It will do you little good to try "go" when PC points to 0x700.
Why don't you use plain "reset" ? [Did you try it?]
My u-boot implementation hangs at a very late position. So I have to place a
Sorry, but this statement makes no sense.
After a "reset", the BDI is expected to stop the CPU right at the reset entry point, i. e. PC should point to 0xFFFFFFFC or so.
Not a single instruction of U-Boot code should be executed after a reset.
But with "reset run" the breakpoint is lost....And with "reset halt", setting a breakpoint and "go" it hangs after a few instructions...Aaargh.
Let me repeat my question:
Why don't you use plain "reset" ? [Did you try it?]
Did you make sure thet the CPUi s stopped when you attempt to set the breakpoint? (issue a "halt" command before setting the BP).
Best regards,
Wolfgang Denk
participants (2)
-
Juergen Beisert
-
Wolfgang Denk