[coldfire-gnu-discuss] Jump from assembly to C problem with boot code on MCF52233
Petter
petter at network-electronics.com
Wed Jun 13 09:46:23 UTC 2007
On Wed, 2007-06-13 at 09:57 +0100, Nathan Sidwell wrote:
> > Did I miss something regarding the linkw instruction in the linker
> > script? Or is some assembly magic required before the jump?
>
> I can't see anything obviously wrong. In taking the exception it has
> pushed
> some information onto the stack frame -- what exeption was taken?
Hm. Good question. The exception description of exception stack frames
in the M68000 programmers reference manual seems a bit complicated and
does not make sense at this point. Does this information help?
----- 8< ----- 8< -----
(gdb) monitor ti
Target state : debug mode
Debug entry cause : single step
Current PC : 0x00010028
(gdb) x /8w 0x20007fe0
0x20007fe0: 0x00000152 0x00000000 0x401d0002 0x44035a3c
0x20007ff0: 0x00000000 0x00000000 0x00000000 0x00000000
(gdb) monitor ti
Target state : debug mode
Debug entry cause : single step
Current PC : 0x00027fac
(gdb) monitor ti
Target state : debug mode
Debug entry cause : single step
Current PC : 0x00000466
(gdb) monitor rd
D0 : 00000000 00000000 00000030 00000006
D4 : 00000018 a661a87d c40f9216 56d33015
A0 : 00000000 44035a4c 200000fc 401d0024
A4 : 1d047492 667d0fa0 00000000 20007fe8
PC : 00000466 SR : 00002704
(gdb) x /8w 0x20007fe0
0x20007fe0: 0x00000152 0x00000000 0x44082704 0x00027fac
0x20007ff0: 0x00000000 0x00000000 0x00000000 0x00000000
(gdb)
----- 8< ----- 8< -----
In the stack dump, 0x2704 seems to be the status register, and
0x00027fac should be the program counter. But 0x4408? Oh! I need to move
on to the ColdFire reference manual :-)
More information about the coldfire-gnu-discuss
mailing list