|
From: | Diego Izidoro |
Subject: | Re: [avr-gcc-list] Interrupts - the hard way |
Date: | Fri, 5 Apr 2013 12:45:05 -0300 |
On Thu, Apr 04, 2013 at 08:40:58AM -0300, Diego Izidoro wrote:I can point you to the related source code, if you're interested.
> 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
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.
The compiler knows about interrupts through the signal/interrupt attribute
> 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.
>
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.
Regards
Senthil
[Prev in Thread] | Current Thread | [Next in Thread] |