avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Ordered todo


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] Ordered todo
Date: Thu, 12 Dec 2002 18:39:26 +0100
User-agent: Mutt/1.2.5i

As Joerg Wunsch wrote:

> > Ultimately, yes. I'd say go ahead and move SREG, SPL and SPH now since
> > that is a relatively simple change.
> 
> SPL/SPH is not present on avr1 architecture devices, but that is easy
> to handle.  There are some devices (with only 256 bytes of SRAM) that
> don't support SPH (2313, 2323, 2343, tiny22, tiny26), but i guess
> nothing bad will happen when attempting to write to the respective
> non-register.  Hopefully, the non-present SPH will read out as 0,
> otherwise malloc() might run into troubles anyway...  We can easily
> #define all the common registers first in <avr/io.h>, and then divert
> to the MCU-specific <avr/ioXXX.h> which can #undefine SPH so the
> application won't see the wrong register name.  Some of the headers
> are even wrong here, e. g. the 2333 has only 128 bytes of SRAM and
> thus no SPH, but the header file declares it anyway...
> 
> MCUCR is only missing in tiny28 and at94k.
> 
> WDTCR is only missing in AT90C8534 (an almost unknown device anyway).
> Pah.  Does the tiny28 really have a different location for WDTCR, or
> is this an error in the header file (0x01 vs. 0x21, looks pretty damn
> like _SFR_OFFSET).  Gotta look into that datasheet...
> 
> XL/XH/YL/YH are only missing in avr1 architectures, easy to catch.
> 
> ZL/ZH is present in all devices.

I left out WDTCR since it's not all that common.

However, i noticed i had to pull in the EEPROM definitions in order to
get eeprom.S assembled using an `anonymous' -mmcu option.  This made
it apparent that the existing EEPROM library will not work with the
ATmega169 since that device uses different IO port locations.  Good to
know at least.

Here's the diff.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

Attachment: diff
Description: Text document


reply via email to

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