Hi, bin Anfänger und habe ein Problem. Anscheinend werden keine Header-Files gefunden: Versuche folgendes zu kompilieren:
Ausgabe von Programmers-Notepad:Code:/* * blink.c * ATtiny2313 mit 1 MHz * PORTB wird ueber ein Timer alle 0.263s ein- und ausgeschaltet. Das entspricht 3.81Hz */ #include <avr/io.h> #include <avr/interrupt.h> #include <avr/signal.h> SIGNAL (SIG_TIMER0_OVF) { PORTB =~ PORTB; // PORTB inventieren } int main() { DDRB = 0xFF; // PORTB als Ausgang schalten PORTB = 0x00; // Alle Ausgaenge auf 0 schalten TCCR0B |= (1 << CS02) | (1 << CS00); //Prescaler auf 1024 stellen TIMSK |= (1 << TOIE0); // Timer 0 Overflow Interrupt enable sei(); // Interrupts einschalten for(;;); //ever }
Code:> "make.exe" all -------- begin -------- avr-gcc (GCC) 4.1.2 (WinAVR 20070525) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiling: blink.c avr-gcc -c -mmcu=atmega32 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=blink.lst -std=gnu99 -Wp,-M,-MP,-MT,blink.o,-MF,.dep/blink.o.d blink.c -o blink.o blink.c:11: warning: 'SIG_TIMER0_OVF' appears to be a misspelled signal handler blink.c:17: warning: function declaration isn't a prototype blink.c: In function 'main': blink.c:21: error: 'TCCR0B' undeclared (first use in this function) blink.c:21: error: (Each undeclared identifier is reported only once blink.c:21: error: for each function it appears in.) make.exe: *** [blink.o] Error 1 > Process Exit Code: 2 > Time Taken: 00:01
Das gleiche bei anderen "simplen" Programmen. Wo nur outp() z.B. benutzt wird. Anscheinend werden die Header-Files nicht richtig gefunden.







Zitieren

Lesezeichen