static initializer

"coles555" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
Hey guys,
I have been stuck with this particular problem for quite some time 
now. I would really appreciate any help. I have been working with the 
PB555 board using Codewarrior. I have modified the initialization 
files so that the code/variables would be located within the MPC555 
memory space. However, for some reason the _ctors and _dtors doesn't 
go inside the code/variable memory range I have specified. Is there 
something special about the _ctors and _dtors variable? I don't 
understand why all the other variables are within the memory range I 
have specified but those are not. _ctors and _dtors are used for 
calling static initializers and destructor function. Below is the 
block of code that uses _ctors for static initializer. According to 
the debugger, _ctors locates in memory address 0x00405340, which is 
outside of the memory range for PB board. So Codewarrior gives me a 
machine check exception.

	/*
	 *	call static initializers
	 */
	for (constructor = _ctors; *constructor; constructor++) {
003FA45C: 3C600040  lis      r3,64
003FA460: 3BE35340  addi     r31,r3,21312
003FA464: 48000014  b        __init_cpp+0x28 (0x3fa478)
		(*constructor)();
003FA468: 819F0000  lwz      r12,0(r31)
003FA46C: 7D8903A6  mtctr    r12
003FA470: 4E800421  bctrl
	}
003FA474: 3BFF0004  addi     r31,r31,4
003FA478: 801F0000  lwz      r0,0(r31)
003FA47C: 28000000  cmplwi   r0,0x0000
003FA480: 4082FFE8  bne      __init_cpp+0x1c (0x3fa468)

}
003FA484: 83E1000C  lwz      r31,12(SP)
003FA488: 80010014  lwz      r0,20(SP)
003FA48C: 7C0803A6  mtlr     r0
003FA490: 38210010  addi     SP,SP,16
003FA494: 4E800020  blr

Any help would be greatly appreciated!
Lei





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/dN_tlB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MPC500/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.