As Anatoly Sokolov wrote:
In new ATMega devices EEPROM support registers are located to other
addresses than in AT90S/old ATMega/ ATTiny, it does illogical and
error prone the generalized definition of these registers in IO.h.
These registers have once already been defined in each individual
io*.h file. The only idea behind centralizing the EE* registers was
that you don't need a -mmcu option to compile them as long as
__COMPILING_AVR_LIBC__ is also set (from the command-line).
I suggest to change the order of definition EEPROM registers as
follows:
1.To define EEPROM SFR and corresponding bits in device ioXXXXX.h files.
2. In io.h for support EEPROM library define EEPROM SFR only if any
of __ AVR_device __ is not defined and defined __ COMPILING_AVR_LIBC
__.
I don't see much point in changing it right now.
My proposal: once we settled for a per-device build system, we
completely drop the current centralized EE* registers from avr/io.h,
and decentralize them back into each individual device's avr/io*.h
file. (IIRC, __COMPILING_AVR_LIBC__ is still needed as the malloc
routines want to have the stack pointer definitions so they need to
#include <avr/io.h> without getting a complaint.)
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL