[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] iousbxx6_7.h ? interrupt vectors misnumbered?
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] iousbxx6_7.h ? interrupt vectors misnumbered? |
Date: |
Mon, 30 Oct 2006 07:17:27 +0100 |
User-agent: |
Mutt/1.5.11 |
As Julian Bleecker wrote:
> For my education (being a newbie and learning a lot, but not
> everything..) ? if I set up an interrupt handler that goes by the
> name USB_GEN_vect, won't it catch _VECTOR(11) interrupts?
It will be translated into the name __vector_10 that is used by the
librarie's startup code.
> In other words, I'm wondering how the numbering can be off between
> the avr-libc and Atmel code?
It's the startup code that installs the vectors, not the
datasheet. :-)
> I'm missing the linkage between what the Atmel datsheet says and
> what the avr-libc code says.
It's in a file called gcrt1.S. The related part looks like:
__vectors:
XJMP __init
vector __vector_1
vector __vector_2
vector __vector_3
...
So the reset entry is effectively entry #0 (though it's got a
different name), followed by __vector_1 for the first real interrupt
vector.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)