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

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

Re: [avr-libc-dev] Re: [avr-gcc-list] Two interrupts one function?


From: Eric Weddington
Subject: Re: [avr-libc-dev] Re: [avr-gcc-list] Two interrupts one function?
Date: Mon, 15 May 2006 17:38:29 -0600
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Joerg Wunsch wrote:
As Eric Weddington wrote:


you could insert in your irq routine the line


asm (".global __vector_3\n\t .equ __vector_3, __vector_13");


Where __vector_13 is the main name of your irq function and
__vector_3 is the alias that you are newly defining. This way, you
will be avoiding the unnecessary jump.


Another option is to pass this to the linker as a --defsym option.

Yeah, but that means getting users to modify their Makefile, and you know how hard *that* is for some/most Windows users...

It would still be better if it were a macro available in avr-libc, because of that.


Would it be worth it to work this up in a C macro and add it to
avr-libc?


I'd be more happy if AVR-GCC implemented the
__attribute__((alias(...))).  It would allow something like

I like that idea too!

<definition snipped>

Alas, when trying to compile it:

% avr-gcc -mmcu=atmega128 -c foo.c
foo.c:13: error: alias definitions not supported in this configuration

Hmpf.

--
Eric Weddington




reply via email to

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