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



_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to