I must be overlooking something simple, but I can't see it.
Using the Flash.zip routines Bigmac posted years ago, with a QD4 and CW10.X my PRM file is modified like:
SSTACK_SEG = NO_INIT 0x00C0 TO 0x00FF;
EEPROM_SEG = READ_ONLY 0xF800 TO 0xF9FF;
ROM1 = READ_ONLY 0xFFC0 TO 0xFFCF RELOCATE_TO 0x00C0;
with
SSTACK INTO SSTACK_SEG;
EEPROM INTO EEPROM_SEG;
FLASH_ROUTINE INTO ROM1;
In the main.c I am locating my variable in the EEPROM space:
#pragma CONST_SEG EEPROM
const byte telltale;
#pragma CONST_SEG DEFAULT
During use, I flash this location when:
if (maxrpm > telltale)
Flash_Program(0xF800, maxrpm)
and wanted read this back after a power cycle:
telltale = (char*)0xF800;
But it won't compile after I added the read back, how should I access this location?
please try this:
telltale = *(unsigned char*)0xE100;
Thank you, this also did not compile. I am waiting for the PT hardware because I believe this will have better flash support. Then I will be working this project further.