#include <avr/eeprom.h>
// defines for eeprom access
#define read_eeprom_byte(address) eeprom_read_byte ((const uint8_t*)address)
#define write_eeprom_byte(address,value) eeprom_write_byte ((uint8_t*)address,(uint8_t)value)
#define read_eeprom_word(address) eeprom_read_word ((const uint16_t*)address)
#define write_eeprom_word(address,value) eeprom_write_word ((uint16_t*)address,(uint16_t)value)
#define read_eeprom_dword(address) eeprom_read_dword ((const uint32_t*)address)
#define write_eeprom_dword(address,value) eeprom_write_dword ((uint32_t*)address,(uint32_t)value)
#define read_eeprom_array(address,value_p,length) eeprom_read_block ((void *)value_p,(const void *)address, length)
#define write_eeprom_array(address,value_p,length) eeprom_write_block (( void *)value_p, (const void *)address, length)
uint8_t my_byte;
uint16_t my_word;
uint32_t my_dword;
char my_text[10]={"123456789\0"};
//--------------- code inside main-----------------
write_eeprom_byte(1,0x0f); // [COLOR="red"]this will be written at runtime (and stored in first run), it will not be includded in the eep file[/COLOR]
write_eeprom_word(3,0x0fff); // [COLOR="red"]this will be written at runtime (and stored in first run), it will not be includded in the eep file[/COLOR]
write_eeprom_dword(10,0x0fffffff); // [COLOR="red"]this will be written at runtime (and stored in first run), it will not be includded in the eep file[/COLOR]
write_eeprom_array(10,my_text,8); // write in eeprom position 10 the 8 first characters of my_text array
// and you can read them using
my_byte=read_eeprom_byte(1);
my_word=read_eeprom_word(3);
my_dword=read_eeprom_dword(10);
read_eeprom_array(10,my_text,5); // read to my_text array 5 char starting from eeprom position 10