Skip to content

EEMEM variable initialization not performed #256

@mikaelpatel

Description

@mikaelpatel

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!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions