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

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

Re: [avr-gcc-list] ISR function name aliasing?


From: John Myers
Subject: Re: [avr-gcc-list] ISR function name aliasing?
Date: Tue, 7 Apr 2009 20:05:15 -0700

I wanted some ISR's in a library so users would only need to include the pre-compiled library file (lib.a) instead of a few source code files. And then depending on what variables or functions are used the appropriate ISR would be added.

On Tue, Apr 7, 2009 at 2:50 AM, David VanHorn <address@hidden> wrote:


On Mon, Apr 6, 2009 at 12:29 AM, John Myers <address@hidden> wrote:
I have an ISR in a library.
I want to be able to compile the ISR with a generic target and not have the ISR name tied to a specific interrupt vector.
I want to be able to add the library with the ISR to a project and then have the ISR function name aliased or linked to the appropriate
vector that the specific AVR target uses.
 
I'am unable to get the project to compile with a vector name in the vector jump table.
The ISR itself is added but nothing in the vector jump table.
 
 
If I'm understanding what you want correctly, you might be able to do this by making the ISR into an include file, rather than .c  .
Coincidentally, I just did this today, where I have two options for compiling.  I set one of two versions, then in main .c file:
 
#ifdef option1
#include "ISR-1.inc"
#endif
#ifdef option2
#include "ISR-2.inc"
#endif
 
In my case, the .inc files contain the vector label, and the entire ISR.
 


reply via email to

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