[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: Thu, 4 Apr 2013 08:40:58 -0300

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 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.

i guess i didn't make my self clear, sorry.

Creating a naked function is not quite there yet, but thank you!

i'm going to start by looking at the .S assembly, but that's not always the best way to understand what's going on. That's why i'm looking for a more explanatory document.

On Thu, Apr 4, 2013 at 6:44 AM, Senthil Kumar Selvaraj <address@hidden> wrote:
On Wed, Apr 03, 2013 at 11:07:11PM -0300, Diego Izidoro wrote:
> Hi,
> Is there any document, reference (beyond the datasheet) in which i can
> learn about how the compiler creates/generates code for interrupts and how
> could i create within my c/c++ program create an interrupt without the help
> of the compiler?

Does avr-libc's documentation of avr/interrupt.h help much?

Assuming you're using the interrupt vector table from avr-libc, creating
a naked function with the name __vector_<n> (where n is the interrupt
number) should do the trick.

Is there something specific you're looking for?


reply via email to

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