gcc - Write default values to eeprom -


this setup:

atmel studio 7.0 avr-gcc atmega644pa 

i'm trying write default values eeprom. mean: in code, predefined values @ specific place in eeprom.

i can use:

__attribute__((section(".eeprom"))) 

which works put variables in eeprom, links variables automatic location. want manually set location variable stored. how can this?

thanks!

ps: needs work >300 variables

you can place variables in 1 struct. variables placed in eeprom in specified order.

struct {    uint8_t  var1;    uint8_t  var2;    uint16_t var3;    ... } eeprom_data  __attribute__ ((section(".eeprom"))); 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -