Maker Pro
Maker Pro

GCC AVR read eeprom block memory

T

terry

I want to read block memory to eeprom using GCC AVR library. I have
written the following but get compiler error (Invalid initializer):

Source code:

unsigned int dm[3][16];
#define EEPROM_SECTION __attribute__ ((section (".eeprom")))
unsigned char eePromDM[3][16] EEPROM_SECTION=2;//<---Compiler error:
Invalid initializer
:
:
eeprom_read_block( &dm, &eepromDM, 48);
:
:

Anyone can help me solve this problem?
 
J

John Miles

I want to read block memory to eeprom using GCC AVR library. I have
written the following but get compiler error (Invalid initializer):

Source code:

unsigned int dm[3][16];
#define EEPROM_SECTION __attribute__ ((section (".eeprom")))
unsigned char eePromDM[3][16] EEPROM_SECTION=2;//<---Compiler error:
Invalid initializer
:
:
eeprom_read_block( &dm, &eepromDM, 48);
:
:

Anyone can help me solve this problem?

I haven't tried to use the EEPROM so can't answer directly, but you
might try the forums at www.avrfreaks.net .

-- jm
 
Top