Warning: C:\AtmelC\TestProgs\M88t.c(10): global variable 'ee_module_id' was declared, but not referenced
Warning: C:\AtmelC\TestProgs\M88t.c(6): global variable 'ee_filler_0' was declared, but not referenced 16-bit "Register 0" is comprised of module id & version.Įeprom unsigned char ee_module_id // Default address 0Įeprom unsigned char ee_module_id = MOD_ME | 0x00 // Default address 0Įeprom unsigned char ee_version // Version xxxĮeprom unsigned char ee_version = 0x23 // Version 2.3 * the variable will be stored in EEPROM at address 0x10 */Įeprom int abc and it will be initialized with the value 123 */Įeprom unsigned int ee_filler_0 // get off address 0 for corruption protectionĮeprom unsigned int ee_filler_0 = 0x55aa // get off address 0 for corruption protection * the variable will be stored in RAM at address 0x182 */įloat pi and it will be initialized with the value 3.14 */ The following procedure must be used if a global variable, placed at a specific address using the operator, must be initialized during declaration: đ6-bit "Register 0" is comprised of module id & version.Įeprom unsigned char ee_module_id // Default address 0Įeprom unsigned char ee_module_id = MOD_ME | 0x00 // Default address 0Įeprom unsigned char ee_version // Version xxxĮeprom unsigned char ee_version = 0x23 // Version 2.3
I assume there were some internal compiler logistical concerns.īut OP's "test = value " line is code outside of a function, isn't it? No warning? Anyway, this works in a recent CV version:Įeprom unsigned // get off address 0 for corruption protectionĮeprom unsigned int ee_filler_0 = 0x55aa // get off address 0 for corruption protection
OP is somewhat on the right track, as in CV when you want a defined address in EEPROM you need a "double declaration". Void memecpy(unsigned char eeprom *eptr, unsigned char *dptr) Void memcpye(unsigned char *dptr, unsigned char eeprom *eptr)