[Top][All Lists]

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

Re: [avr-gcc-list] Two interrupts with same handlers

From: Larry Barello
Subject: Re: [avr-gcc-list] Two interrupts with same handlers
Date: Tue, 4 Dec 2001 14:36:06 -0800

Easy: write one interrupt handler in assembly and just have it
jump to the real handler. Say your overflow handler is the real
one, then make a new file with the following:.

    .func myfunc
    .global _comparator_

    rjmp    _overflow0_


Assemble it (no headers needed) and include it in the list of
stuff to be linked.  NB the *real* handler symbolic names can be
found in "sig-avr.h"


----- Original Message -----
From: "Carsten Beth" <address@hidden>

> Hi there,
> I have  written an application with avr-gcc which uses two
> sources (analog compare match and timer0 overflow). Both
interrupts have
> the same handler. So I wrote something like this:
> All is working very fine, but the compiler wastes a lot of
> memory. He generates two interrupt vectors which point to
> functions and both functions make a lot of push and pop with a
> interrupt_handler in between. Actualy both function do the same
> so the interrupt vectors could point to the same function.
> Is there any way to manipulate the code, so no or less memory
is wasted?

reply via email to

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