Propeller EEPROM/MEMORY organization
Jasper_M
Posts: 222
If a project has multiple objects, are all DAT/SPIN sections still grouped together at the beginning of EEPROM, and space for VAR/STACK after them?
ie. is the layout like the following:
CODE FROM OBJ 0
CODE FROM OBJ 1
VAR FROM OBJ 0
VAR FROM OBJ 1
STACK SPACE
and not like the following:
CODE FROM OBJ 0
VAR FROM OBJ 0
CODE FROM OBJ 1
VAR FROM OBJ 1
STACK SPACE
I'm asking this because I want to store data in EEPROM in the first 32KB area.
ie. is the layout like the following:
CODE FROM OBJ 0
CODE FROM OBJ 1
VAR FROM OBJ 0
VAR FROM OBJ 1
STACK SPACE
and not like the following:
CODE FROM OBJ 0
VAR FROM OBJ 0
CODE FROM OBJ 1
VAR FROM OBJ 1
STACK SPACE
I'm asking this because I want to store data in EEPROM in the first 32KB area.
Comments
If you write to the EEPROM locations corresponding to variables in your program (if XXX is a variable, you write to EEPROM location @XXX), the variables will be initialized to the saved values on a reboot since the saved values replace the default zero value in the EEPROM and the whole EEPROM is copied to RAM on a reboot.