zheng xuguang

problem with memory mapping!  thanks all!

Discussion created by zheng xuguang on Apr 28, 2009
Latest reply on May 4, 2009 by yadunandankasu yadunandankasu

Hello everyone!

i have a problem with memory mapping. For some reason ,I want to remap the register address space: 0x0000-0x3FFF, ram address space:0x0400-0x37FF, and eeprom:0x3800-0x3FFF. I use mc9s12dp512, P&E USB multilink interface tool. The process as follows.
1. modify the prm files ,
/* RAM */
      RAM           = READ_WRITE    0x0400 TO   0x37FF;
/* EPROM */
EEPROM        = READ_ONLY     0x3800 TO   0x3FFF;
2. in the start12.c file , join these commands :
INITRG = 0;
INITRM = 0;
INITEE = 0x31;
  3. then in the main.c file ,define a globle const variable
const volatile unsigned char tst1 @ 0x3c00 = 0x0a;
  
problem is  when run into the main() function, in my opinion, the tst1 should equal 0x0a, but actually , tst1 = 0xFF.  And the address content is also 0xff through memory window.

thanks for help ! 

Best wishes!

 

eeprom_test1.zip

Message Edited by t.dowe on 2009-10-21 12:43 AM

Outcomes