avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Latest release


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Latest release
Date: Sat, 18 Mar 2006 07:56:27 +0100 (MET)

"Larry Barello" <address@hidden> wrote:

> I just upgraded from last Feb to this Jan release of WinAvr.  I have
> not been following the chatter and in fact I have been offline for
> the last two or three months (w/regard to avr gcc list).

Well, the changes you're asking about have been discussed in
September, 2005.  As it was clear they constituted an API change, we
extended the audience from avr-libc-dev to avr-gcc-list.

> What happened to "INTERRUPT"?  Why was that and SIGNAL depreciated?

INTERRUPT and SIGNAL were misnomers from the beginning.  Anyone
starting and not reading the docs very carefully (and you know, there
are always *lots* of these people, as they are eager to see some
result rather than spending three days in reading first) would
intuitively use INTERRUPT for an interrupt handler -- and eventually
fail (depending on the situation).  This macro was simply too
dangerous to go by that name.

I cannot see a motivation at all to call an interrupt a `signal', not
really from a microcontroller point of view, nor from the historical
meaning of signal (in Posix/UNIX context).  So we eventually got rid
of the term `signal' alltogether.

Normally, we'd probably have opted for using INTERRUPT to start an
ISR, but that was now impossible, given the name had a different
meaning in the past, so we removed it.  The agreed solution was to
start an interrupt handler with ISR, as that is intuitive enough for
everyone.  The vector names have been renamed from SIG_XXX to
XXX_vect, to get rid of the idea of `signal' here as well, and in
order to allow for a simplified solution to produce code for both, IAR
and AVR-GCC.  The vector names are now strictly derived from the XML
files (which should match the datasheet), including all stupidities
there.  However, previously the names have been ``freely invented'',
so now there's at least *some* definitive guide how the name has been
obtained, and as the datasheet is also the primary source of all other
names related to the AVR (regardless how often they changed names
between different AVRs), this is only fair I think.

The old SIG_XXX macros will be maintained for the forseeable future
for all devices that had been supported in avr-libc <= 1.2.x.  Note
that for new devices, SIG_XXX names will *not* be invented, so you
might really want to get used to the new naming scheme.

> Is it safe to continue to use the "interrupt" attribute?

Yes, it is the official way now if you need an ISR that can be
interrupted as early as possible.  (Most people will certainly be OK
with just issuing sei() at the beginning of their ISR.)  There are no
plans to change the GCC code itself, not even to remove the "signal"
attribute there, though it might be worthwhile in the long run to
replace it by "isr" as well, as it will become an anachronism.  GCC
tends to move very slowly, compared to the pace of AVR (and thus,
avr-libc) development.

-- 
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]