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

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

Re: [avr-libc-dev] iom2560.h


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] iom2560.h
Date: Mon, 31 Oct 2005 20:18:04 +0100
User-agent: Mutt/1.4.2.1i

As Mark E. Scott Jr. wrote:

> I am working on creating iom2560.h, but have a question about some
> of the definitions I see in other header files.

Atmel ships AVR Studio with a converter that can create the skeleton
of a header file from the XML file.  Their interrupt naming convention
differs from our convention (our traditional SIG_XXX names aren't
directly derivable from the XML), but for the rest of the job, it
could be some help to you.  Alas, it's a Windows-only tool, it doesn't
even run under the Wine emulator as they are relying on Microsoft's
XML parser library.  (That's why for some old mysterious bug in AVR
Studio, you had to obtain the latest MS XML library to get the bug
fixed...)

> In the iom128.h file, I see _SFR_IO8 and _SFR_MEM8.  What are the
> differences between those?  It seems on the m128 they start using
> _SFR_MEM8 by address 0x61.

That's the barrier where IO space finishes (though I thought it would
have been 0x100 on the ATmega128).  _SFR_IO8 declares a register by
its IO-space address (for IN/OUT instructions), _SFR_MEM8 declares a
register by its memory-mapped address (LDS/STS).  Of course, as the
entire IO register space is mapped into memory (and as the decision
whether IN/OUT or SBI/CBI can be used is made by the optimizer), you
could even declare any and all IO registers by _SFR_IO8, it's just you
have to add the 0x20 offset to the parameter value all the time then.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)





reply via email to

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