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

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

[avr-gcc-list] RFC: interrupt vectors in gcrt1.S


From: Marek Michalkiewicz
Subject: [avr-gcc-list] RFC: interrupt vectors in gcrt1.S
Date: Mon, 22 Oct 2001 12:57:10 +0200 (CEST)

Hello,

I'd like to add support for some new devices to gcrt1.S in avr-libc,
and there is a small problem with interrupt vectors.  They are not
necessarily in the same order anymore (for example, see UART1 in
atmega161 and atmega128, or at94k...), and gcrt1.S becomes a little
difficult to maintain.  So I'd like to change names of interrupt
vectors in gcrt1.S to look like: __vector_1, __vector_2, ...

Now, the io*.h file specific to each device will have:

#define SIG_INTERRUPT0 __vector_1
#define SIG_INTERRUPT1 __vector_2

and so on, you get the idea.  Still, to avoid waste of program memory
on smaller chips, crt*.o for each one will only have the necessary
interrupt vector size.  Things would still work the same way, only all
these nice interrupt names are moved from crt*.o to include files and
now the C preprocessor expands them to __vector_N.

This should make it easier to add support for more new devices in the
future.  These __vector_N names can also be used directly if necessary
(say if you have your own custom ASIC containing an AVR core with a
non-standard set of interrupts, different from any existing device).

At the same time I'd like to remove the SIG_* defines from <sig-avr.h>
(now they would be in io*.h for each device, where I think they belong).

There are a lot of files to change in avr-libc, so please expect some
temporary breakage.  Files to support the most popular devices will be
changed first.  I use mainly AT90S8535 and ATmega163, I guess the 2313
and 8515 are quite popular too, any others?

Does anyone see problems with this?

It will take some time as I'm very busy (I thought I was very busy
a year ago, now it's worse...) but I'd like to discuss this here.

Still not sure if there is any good way to warn about misspelled names
of interrupt functions (other than looking at the interrupt vectors in
the linker output file), while we are at it...

Thanks,
Marek




reply via email to

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