hi
nachdem ich es nach viel hin und her endlichgeschafft habe mit meinem mac avrs zu proggen hab ich auch schon wida ein prob.
und zwar wollte ich eine led blinken lassen indem ich durch einen timer interrupt den entsprechendenport invertiere.
den code hab ich aus der dokumentation von diesem (http://www.talentraspel.de/portal/) system.
bei mir sieht der code so aus:
allerdings sagt der compiler immer das:Code:#include <inttypes.h> // Allgemeine Bibliotheken #include <avr/io.h> #include <avr/interrupt.h> #include <avr/signal.h> #include <stdint.h> signal(sig_overflow0) { TCNT0=0x00; PORTB=~PORTB; } int main (void) { DDRB=0xFF; PORTB=0x00; TCCR0=(5<<CS00); TCNT0=0x00; sbi(TCCR0, TCNT0); sei(); for(;;){} }
kann mir wer sagen wo ich den fehler habe?Code:-------- begin -------- avr-gcc (GCC) 3.4.3 Copyright (C) 2004 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: test5.c avr-gcc -c -mmcu=atmega8 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=test5.lst -std=gnu99 -Wp,-M,-MP,-MT,test5.o,-MF,.dep/test5.o.d test5.c -o test5.o test5.c:8: warning: return type defaults to `int' test5.c:8: warning: function declaration isn't a prototype test5.c: In function `signal': test5.c:8: warning: type of "sig_overflow0" defaults to "int" test5.c: In function `main': test5.c:20: warning: implicit declaration of function `sbi' test5.c: In function `signal': test5.c:11: warning: control reaches end of non-void function Linking: test5.elf avr-gcc -mmcu=atmega8 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=test5.o -std=gnu99 -Wp,-M,-MP,-MT,test5.o,-MF,.dep/test5.elf.d test5.o --output test5.elf -Wl,-Map=test5.map,--cref -lm test5.o(.text+0x2a): In function `main': test5.c:20: undefined reference to `sbi' make: *** [test5.elf] Error 1
ich such schon den ganzen tag danach und in der forensuche hab ich auch nix gefunden was mir hilft.
mfg macgyver
[/code]







Zitieren

Lesezeichen