most of my eeprom variables are defined normally, but i need a byte that the bootloader reads. And of course, this can't be automatically placed by the compiler. Can I declare an eeprom variable in such a way, that the compiler will understand this?
bootloader and program sharing eeprom variable
Author
Message
Level: Moderator
Joined: Mon. Jul 18, 2005
Posts: 101136 View posts
Location: (using avr-gcc in) Finchingfield, Essex, England
Sure:
eeprom_update_byte((uint8_t *))0x1234, 37);
Writes 37 to absolute location 0x1234.
Of course you have to be careful that the linker isn't already placing something in location 0x1234. But if you work from the end backwards you should be OK.