>You did read http://www.denx.de/wiki/view/DULG/DebuggingTricks , didn't
I did, but those compiler flags were in by board directory, I moved them
to the makefile in the top directory, and this simplifies watching the
But back to the problem.
118 reg =3D memctl->memc_br0;
119 reg &=3D BR_PS_MSK; /* Clear everything except Port
Size bits */
120 reg |=3D BR_V; /* then add just the "Bank Valid"
121 memctl->memc_br0 =3D reg;
In Assembly, this compiles to:
Ln 118 0xff007ce4 <cpu_init_f+172>: lwz r0,0(r28)
Ln 119 0xff007ce8 <cpu_init_f+176>: rlwinm r0,r0,0,20,21
Ln 120 0xff007cec <cpu_init_f+180>: ori r0,r0,1
Ln 121 0xff007cf0 <cpu_init_f+184>: stw r0,0(r28)
r28 holds the value 0xfa200100 (the location of br0)
At line 118, br0 is loaded into r0. r0 then holds 0xfc000001.
At line 119, r0 becomes 0x00000000. <<-- This is the problem, I think
At line 120, r0 becomes 0x00000001
At line 121, r0 is saved to br0 (the address pointed to by r28).=20
(br0 becomes 0x00000001)
#define BR_PS_MSK 0x00000C00=20
Is this right?
The program fails at ln 180 with:
"Program received signal SIGABRT, aborted."
But by this time, br0 was reloaded with CFG_BR0_PRELIM from line 176.=20
Any more ideas?
From: wd@... [mailto:wd@...
Sent: Tuesday, June 20, 2006 5:53 PM
To: Jeff Mann
Subject: Re: [U-Boot-Users] u-boot hangs in ./cpu/mpc8xx/cpu_init.c when
> reg does not get the value of br0 at line 118, like it should. In=20
> fact, DDD acts like the variable does not even exist. So at line 121,=20
> br0 is
> Any suggestions?
You did read http://www.denx.de/wiki/view/DULG/DebuggingTricks , didn't
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@...
The light at the end of the tunnel is usually a "No Exit" sign.