|
From: | Georg-Johann Lay |
Subject: | Re: [avr-gcc-list] Internal handling of interrupt vectors and jump table |
Date: | Tue, 11 Aug 2015 18:53:20 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
Am 08/11/2015 um 12:04 PM schrieb Klaus Rudolph:
can someone explain how interrupt vectors are handled in gcc internally?
ISR functions are implemented as function attributes, i.e. there are avr-specific function attribute (__interrupt__, __signal__) which turn an ordinary function into an ISR. Main outcome of these attributes is that ./gcc/config/avr/avr.c::avr_expand_prologue() emits a different prologue for ISRs. Similar for avr_expand_epilogue().
Attribute handling like special diagnostics for ISRs is performed by avr_set_current_function().
OK, I saw that in /opt/avr_5.2.0/lib/gcc/avr/5.2.0/../../../../avr/lib/avr5/crtatmega32.o the empty vector table is included, like: Disassembly of section .vectors: 00000000 <__vectors>: 0: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> 4: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> 8: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> And I also can see, that my code results in: Disassembly of section .text: 00000000 <__vector_7>:
The .vectors section is implemented in AVR-LibC's gcrt1.S. ISR and similar macros are provided by interrupt.h.
but where can I see that __vector_7 goes to the correct place in the table?
To see the macros after expansion compile with -save-temps and read the respective .i file (C) or .ii file (C++).
Johann
[Prev in Thread] | Current Thread | [Next in Thread] |