Im using a MC9S12DP256 processor
1. My ICC compiler would automatically generate code to initalize variables if I decleared it as such
uchar cTemp = 12;
cTemp would contain 12 I cannot see any code added. Also if I write my own init routine the system works correctly. Is the a switch or something I need to allow this to happen. This is in Internal processor RAM.
.prm file declears it as such
RAM = READ_WRITE 0x1000 TO 0x3FFF;
DEFAULT_RAM INTO RAM;
I also have bettery backed external ram. It is decleared as such
/* banked RAM */
PAGE_10 = NO_INIT 0x104000 TO 0x107FFF;
PAGE_11 = READ_WRITE 0x114000 TO 0x117FFF;
PAGE_12 = READ_WRITE 0x124000 TO 0x127FFF;
PAGE_13 = READ_WRITE 0x134000 TO 0x137FFF;
PAGE_14 = READ_WRITE 0x144000 TO 0x147FFF;
PAGE_15 = READ_WRITE 0x154000 TO 0x157FFF;
PAGE_16 = READ_WRITE 0x164000 TO 0x167FFF;
PAGE_17 = READ_WRITE 0x174000 TO 0x177FFF;
PAGE_18 = READ_WRITE 0x184000 TO 0x187FFF;
PAGE_19 = READ_WRITE 0x194000 TO 0x197FFF;
PAGE_1A = READ_WRITE 0x1A4000 TO 0x1A7FFF;
PAGE_1B = READ_WRITE 0x1B4000 TO 0x1B7FFF;
PAGE_1C = READ_WRITE 0x1C4000 TO 0x1C7FFF;
PAGE_1D = READ_WRITE 0x1D4000 TO 0x1D7FFF;
PAGE_1E = READ_WRITE 0x1E4000 TO 0x1E7FFF;
PAGE_1F = READ_WRITE 0x1F4000 TO 0x1F7FFF;
BATTERY_RAM INTO PAGE_11,PAGE_12,PAGE_13,PAGE_14,PAGE_15,PAGE_16,PAGE_17,
PAGE_18,PAGE_19,PAGE_1A,PAGE_1B,PAGE_1C,PAGE_1D,PAGE_1E,PAGE_1F;
PROGRAM_RAM INTO PAGE_10;
The program ram is the one I are concerned about at present.
I have a variable that has a dat value of 255 and 253 in it and I are looking for these values at start up. They are there before reset but cannot be found at startup. The page is set so as it doesn't initalize the variables. The access to the external ram is working as I can mut valid data in the memory and read it off correctly.
It seems to me the bit of data I wont to keep I cant and the bit I dont wont I can.
does anyone have a surgestion or come accross something simalar.
Message Edited by CrasyCat on 2007-04-13 11:21 AM