Anonymous
Not applicable
Oct 05, 2011
09:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 05, 2011
09:20 PM
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.
1 Reply
Oct 16, 2011
08:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 16, 2011
08:16 PM
This is an interesting question and I'd hope that some embedded C-experts would step in and answer.
Anyone?