[Top][All Lists]

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

Re: [avr-gcc-list] Interrupts - the hard way

From: Diego Izidoro
Subject: Re: [avr-gcc-list] Interrupts - the hard way
Date: Fri, 5 Apr 2013 12:45:05 -0300

Thank you! I think that will help a lot.

On Fri, Apr 5, 2013 at 11:29 AM, Senthil Kumar Selvaraj <address@hidden> wrote:
On Thu, Apr 04, 2013 at 08:40:58AM -0300, Diego Izidoro wrote:
> Compiling with "-nodefaultlibs" should do the trick to remove the interrupt
> code generation, that's the easy part. What i want is to manually build the
> interrupt vector and implement the ISRs (complete with context saving and

I can point you to the related source code, if you're interested.

The vector table layout is in avr-libc (avr-libc/crt1/gcrt1.S) - there
is a vector macro defined for jumping to a handler, and then a bunch of
macro invocations corresponding to each interrupt.

> context restoring operations). It's kind of a challenge, where the compiler
> is supposedly more primitive and doesn't know what it is an interruption.

The compiler knows about interrupts through the signal/interrupt attribute
specified for the ISR. See gcc/config/avr/avr.c, and grep for signal.
You should find a few predicate functions (avr_signal_function_p,
avr_interrupt_function_p), and searching for their callers should get
you started.


reply via email to

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