Daniel Rogers

Memorry allication

Discussion created by Daniel Rogers on May 8, 2008
Latest reply on May 8, 2008 by CompilerGuru
Is there a reason for not being able to declear my memory allocation like this

BATTERY_RAM       INTO  NO_INIT     0x200000'G TO 0x2FFFFF'G;   // CS1 BatteryRAM;

If I declear it as such GPage never changes an thus the 0xFFFF blocks of memory get corrupted as the data exceeds 0xFFFF.

But if I declear it like this.

BATTERY_RAM          INTO  NO_INIT     0x200000'G TO 0x20FFFF'G;   // CS1 BatteryRAM;
BED_RAM                   INTO  NO_INIT  0x210000'G TO 0x21FFFF'G;   // CS1 BatteryRAM;
EXTERNAL_RAM        INTO  NO_INIT  0x220000'G TO 0x22FFFF'G;   // CS1 BatteryRAM;

It is fine.

If the first one should work if I have an array the covers 2 GPages does code warrior cope I am I safer to declear it the secound way.

Using a HCS12XDP512MAG processor

Code worrior IDE 5.7 and HCS(X)12 v4.5

Thanks

Outcomes