ImageCraft ICCAVR compile error in eeprom.h

Nov 22, 2005 1 Replies

using: ImageCraft IDE v6.31 - ATMega64



One of the standard include files is "eeprom.h", included below. I am getting a compile error at the point marked with "#*#*". As you can see, this file does not include a test for ATMega64, so EEPROMwrite is not defined, which I assume is the problem.



I'm getting into a realm that I don't understand. I need to know if either of the definitions provided are appropriate for the ATMega64 (can I just add " || defined(ATMega64) ", or whether I need to create a new definition (or whether I'm waaaay off track).



Any idea of what additional problems I might run into (even though this version of ICCAVR is supposed to support the mega64)?



Thx Scott Kelley



/*



** Header file : eeprom.h
*/ #ifdef _AVR /* AVR EEPROM access functions */ #ifndef __EEPROM__H #define __EEPROM__H

/* These defines are passed by the IDE as appropriate */ #if defined(ATMega169) || defined(ATMega48) || defined(ATMega88) || defined(ATMega168) || defined(ATMega165) #define EEPROMread EEPROMread_extIO #define EEPROMwrite EEPROMwrite_extIO #define EEPROMReadBytes EEPROMReadBytes_extIO #define EEPROMWriteBytes EEPROMWriteBytes_extIO



#elif defined(ATtiny13) || defined(ATtiny2313) || defined(ATtiny26) || defined(AT90S2313) || defined(AT90S2323) || defined(AT90S2333) || defined(AT90S2343) || defined(AT90S4414) || defined(AT90S4433) || defined(AT90S4434)



#define EEPROMread EEPROMread_256 #define EEPROMwrite EEPROMwrite_256 #define EEPROMReadBytes EEPROMReadBytes_256 #define EEPROMWriteBytes EEPROMWriteBytes_256 #endif



#define _256EEPROMread EEPROMread_256 #define _256EEPROMwrite EEPROMwrite_256



#*#* int EEPROMwrite( int location, unsigned char); unsigned char EEPROMread( int);



void EEPROMReadBytes(int addr, void *ptr, int size); void EEPROMWriteBytes(int addr, void *ptr, int size);



#define EEPROM_READ(addr, dst) EEPROMReadBytes(addr, &dst, sizeof (dst)) #define EEPROM_WRITE(addr, src) EEPROMWriteBytes(addr, &src, sizeof (src))



#endif #endif


// richard http://www.imagecraft.com

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required