arduino / arduino/ArduinoCore-avr
EEMEM variable initialization not performed
Open
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
A practical method of allocating and initiating a variable in eeprom is to use the AVR EEMEM attribute (short form for a GCC function attribute). Unfortunately the initialization gets lost in the build/upload process in Arduino.
uint8_t foo EEMEM = 42;
eeprom_read_byte((const uint8_t*) &foo); // will return 255 and not 42
Cheers!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.