gcc - EEPROM write and read unknown directive -
i have problem avr-gcc. have error recurring:
undefined reference `__eerd_block'
this referred macro
eeload(s) , eesave(s) s structure of uint, structs, eccc...
the define of eeload(s) , eesave(s) are:
#define eeload( s ) eeprom_read_block( &s, s##_eeprom, sizeof(s) ) #define eesave( s ) eeprom_write_block( &s, (void*) s##_eeprom, sizeof(s) )
i know s##_eeprom
, or how ##
translated, should address, can't figure out how can modify or how make work this.
##
used glue 2 tokens. eeload(foo)
substituted eeprom_read_block(&foo, foo_eeprom, sizeof(foo))
. you'll find more information ## here here macro itself, foo_eeprom should valid address eeprom space. should have defined somewhere code compile.
Comments
Post a Comment