First thing you need to define the EEPROM segment in the prm file so the linker knows the location of the EEPROM in the memory map
/* Add this in the prm file above the RAM section */
EEPROM = READ_ONLY 0x0C00 TO 0x0FFF;
/* Add this to the prm file after the DEFAULT_RAM section *\
EEPROMDATA INTO EEPROM;
Now on to declaring the array in c code
/* We first need to tell the compiler which segment we want to use */
#pragma CONST_SEG EEPROMDATA
/* Now declare an array in the EEPROM segment with initialized values */
const int MyIntegerArray[5] = {1,2,3,4,5};
/* Return to default constant segment */
#pragma CONST_SEG DEFAULT
You can now declare this as extern const data in an include file so the array can be used by other code.
Message Edited by Technoman64 on 05-18-200608:43 AM