Can anyone help with this:
I use the line
const struct array[0x800] __attribute__ ((section ("EEPROMDATA")));
in the C source to place an array in the eeprom space. I then added the linker custom flag
"-section-start EEPROMDATA=0x40008000" to provide an absolute load location.
The code compiles, and the map shows the variable assigned to the section EEPROMDATA, but it is located in the data section instead of at the eeprom location provided.
I know I can accomplish what is necessary with pointers to eeprom, but this approach allows the code to access structure elements directly.
This is an interesting question and I'd hope that some embedded C-experts would step in and answer.