Re: Interrupts - the hard way

Diego Izidoro <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <CAPELgxwa24vczns=rZYcsM6DddG=YUhKzNzSWe_=OGL2vw6nYQ@mail.gmail.com>
Thank you! I think that will help a lot.


On Fri, Apr 5, 2013 at 11:29 AM, Senthil Kumar Selvaraj <
[email protected]> 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.
>
> Regards
> Senthil
>

_______________________________________________
AVR-GCC-list mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.