MCF52233 access error exception.

Mats Blide matsblide at hotmail.com
Thu Jan 18 11:06:11 UTC 2007


Hi again, Thank's for your previous help. Now I have my system up and 
running and it's talking TCP/IP to me and I am verry happy :-). But.....: I 
get access error exceptions. I have boiled down the problem being, calling 
functions in the address range F000-100000, as far as I can tell. I don't 
know if it is a hardware configuration problem or a GDB problem. Take a look 
at this:

(gdb) disas
Dump of assembler code for function start:
0x00000408 <start+0>:   movew %d4,%sr
0x0000040a <start+2>:   movel %d0,%a3 at -
0x0000040c <start+4>:   movel #536870912,%d0
0x00000412 <start+10>:  oril #513,%d0
0x00000418 <start+16>:  movec %d0,%rambar
0x0000041c <start+20>:  movel #289,%d0
0x00000422 <start+26>:  movec %d0,%flashbar
0x00000426 <start+30>:  moveal #536903679,%sp
0x0000042c <start+36>:  linkw %fp,#-8
0x00000430 <start+40>:  jsr 0xf2fe           <----------------------- This 
was put here to provoke the
                                                                             
            problem. At 0xf2f2 there is a rst
                                                                             
            instruction.
0x00000436 <start+46>:  jsr 0x15d4 <init_main>

When single steping this:

(gdb) nexti
57        move.l  #__SRAM, d0
(gdb)
58        ori.l   #( MCF5XXX_RAMBAR_SPV | MCF5XXX_RAMBAR_V ), d0
(gdb)
59        movec   d0, rambar
(gdb)
62        move.l   #0x00000121,d0
(gdb)
63        movec    d0,FLASHBAR
(gdb)
66        move.l  #__stack, sp
(gdb)
Cannot access memory at address 0x20007fff
(gdb)
start () at system/crt0.S:69
69        jsr 0xf2fe
(gdb)
Cannot access memory at address 0x20007fff
(gdb)
0x04000000 in ?? ()

Now PC is 0x04000000!!

And the stack looks like this:

(gdb) i s
#0  0x04000000 in ?? ()
#1  0x74082700 in ?? ()
#2  0x0000f2fe in udp_init () at lwip/src/core/udp.c:71
Cannot access memory at address 0x20007fff
(gdb)

When running the program, without the ‘dummy’ jsr 0xf2fe in the startup code 
it runs fine as long as there is no call to functions close to this address 
which results in a access error exception. Calling function at 0xa964 or 
0x10100 for example is no problem.

Help! :-)

/Mats

_________________________________________________________________
MSN bjuder på musikstreaming i en månad http://www.msn.se/music/




More information about the coldfire-gnu-discuss mailing list