Hallo
ich habe in der Schule schon mit dem Asuro programmiert und hat alles auch soweit gut funktioniert. Nun habe ich mir selber einen besorgt. Zusammenlöten hat alles geklappt. Nun wollte ich programmieren. Habe WinAVR nach der Anleitung installiert und den ersten test.c compiliert. Hat ohne probleme funktioniert. Nun habe ich mir das Programm (.c) aus der Schule mitgenommen und wollte es auf meinem Asuro überspielen. Dazu wollte ich es compilieren. Aber dann kommen die Fehler:
Der Lehrer hat das makefile auch schon so abgeändert für firsttryCode:> "make.exe" all -------- begin -------- avr-gcc (WinAVR 20080610) 4.3.0 Copyright (C) 2008 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: firsttry.c avr-gcc -c -mmcu=atmega8 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=firsttry.lst -std=gnu99 -Wp,-M,-MP,-MT,firsttry.o,-MF,.dep/firsttry.o.d firsttry.c -o firsttry.o ./asuro.h:71: warning: inline function 'MotorSpeed' declared but never defined ./asuro.h:66: warning: inline function 'MotorDir' declared but never defined ./asuro.h:56: warning: inline function 'FrontLED' declared but never defined ./asuro.h:52: warning: inline function 'StatusLED' declared but never defined ./asuro.h:71: warning: inline function 'MotorSpeed' declared but never defined ./asuro.h:66: warning: inline function 'MotorDir' declared but never defined ./asuro.h:56: warning: inline function 'FrontLED' declared but never defined ./asuro.h:52: warning: inline function 'StatusLED' declared but never defined Compiling: asuro.c avr-gcc -c -mmcu=atmega8 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=asuro.lst -std=gnu99 -Wp,-M,-MP,-MT,asuro.o,-MF,.dep/asuro.o.d asuro.c -o asuro.o Linking: firsttry.elf avr-gcc -mmcu=atmega8 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=firsttry.o -std=gnu99 -Wp,-M,-MP,-MT,firsttry.o,-MF,.dep/firsttry.elf.d firsttry.o asuro.o --output firsttry.elf -Wl,-Map=firsttry.map,--cref -lm firsttry.o: In function `main': firsttry.c:42: undefined reference to `FrontLED' firsttry.c:43: undefined reference to `MotorDir' firsttry.c:44: undefined reference to `MotorSpeed' firsttry.c:51: undefined reference to `MotorSpeed' firsttry.c:57: undefined reference to `MotorDir' firsttry.c:58: undefined reference to `MotorSpeed' firsttry.c:61: undefined reference to `MotorDir' firsttry.c:62: undefined reference to `MotorSpeed' make.exe: *** [firsttry.elf] Error 1 > Process Exit Code: 2 > Time Taken: 00:03
Der Code was ich compilieren ist
vielleicht kann mir jemand helfen. DankeCode:#include "asuro.h" void delay(int zlr); unsigned char taste; unsigned char PollSwitch(void); int main(void) { Init(); while(1) { FrontLED(ON); MotorDir(FWD,FWD); MotorSpeed(130,128); taste = PollSwitch(); if (taste > 2 ) { MotorSpeed(0,0); BackLED(ON,ON); delay(500); while(1) { MotorDir(RWD,RWD); MotorSpeed(130,128); delay(300); MotorDir(BREAK,RWD); MotorSpeed(130,128); delay(800); BackLED(OFF,OFF); break; } } } return 0; } void delay (int zlr) { unsigned int i; i = 1; while (i < zlr) { Sleep (72); i++; } return; }







Zitieren

Lesezeichen