This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

eeprom data initialization

Hi,

Is there any way to initialize EEPROM data except during running time ?

Regards,

Andre

Parents
  • Hmm, directly from C code? I suppose that depends a bit on what your programmer needs in order to program the EEPROM area. I wrote my own serial programming utility and a separate compiler of sorts that generates EEPROM HEX files in the 0x2000-0x27FF range where the EEPROM is mapped during programming, so I never put any kind of "EEPROM initializers" in my actual C code.

    Off the top of my head, I suppose I'd try something like defining initialized data objects qualified with "const" and "code" they would get allocated to program memory, then coerce the linker to locate that particular code segment within the EEPROM address range.

    Don't bother thinking about using the _at_ keyword for initialized data objects. It won't work and has been discussed here frequently.

Reply
  • Hmm, directly from C code? I suppose that depends a bit on what your programmer needs in order to program the EEPROM area. I wrote my own serial programming utility and a separate compiler of sorts that generates EEPROM HEX files in the 0x2000-0x27FF range where the EEPROM is mapped during programming, so I never put any kind of "EEPROM initializers" in my actual C code.

    Off the top of my head, I suppose I'd try something like defining initialized data objects qualified with "const" and "code" they would get allocated to program memory, then coerce the linker to locate that particular code segment within the EEPROM address range.

    Don't bother thinking about using the _at_ keyword for initialized data objects. It won't work and has been discussed here frequently.

Children
No data