1 Reply Latest reply on Oct 16, 2011 8:16 PM by rotec_264361

    How to locate data in EEPROM for PSoC5 with GCC

      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.