[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Change EEPROM SFR definition.

From: Anatoly Sokolov
Subject: Re: [avr-libc-dev] Change EEPROM SFR definition.
Date: Fri, 1 Jul 2005 00:03:35 +0400


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

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.

I see two reasons to make it now: 1. Fix bug #13290; 2. After addition of support of new devices it will be necessary to correct more files.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]