Hallo,
ich versuche mich gerade an einem sehr einfachen Timer-Projekt mit einem
Atmega8. Als Compiler verwende ich AVR-GCC 4.7.2.
Mein Problem: Ich vermisse den Interrupt-Table an Adresse 0.
main.c:
1 | #include <avr/io.h>
|
2 | #include <avr/interrupt.h>
|
3 |
|
4 |
|
5 | ISR(TIMER0_OVF_vect) {TCNT0 = TCNT0 + 1;}
|
6 |
|
7 | int main(void) {
|
8 | TCCR0 = (1<<CS00);
|
9 | TIMSK = (1<<TOIE0);
|
10 | TCNT0 = 1;
|
11 |
|
12 | sei();
|
13 | while(1);
|
14 | }
|
Kompilierungsvorgang:
1 | avr-gcc -Wall -O2 -mmcu=atmega8 -c main.c -o main.o
|
2 | avr-gcc -o main.bin main.o
|
3 | avr-size main.bin
|
4 | text data bss dec hex filename
|
5 | 42 0 0 42 2a main.bin
|
6 | avr-objcopy -j .text -j .data -O ihex main.bin main.hex
|
Disassembly (avr-objdump -D -S -s main.bin):
1 | Disassembly of section .text:
|
2 |
|
3 | 00000000 <__vector_9>:
|
4 | 0: 1f 92 push r1
|
5 | 2: 0f 92 push r0
|
6 | 4: 0f b6 in r0, 0x3f ; 63
|
7 | 6: 0f 92 push r0
|
8 | 8: 11 24 eor r1, r1
|
Weshalb beginnt die .text-Sektion an Adresse 0 direkt mit dem
Timer0-Overflow-Handler (Vektor 9)? Wo sind die Sprünge des
Interrupt-Tables hin?