Guten Tag
Ich habe ein Problem bei der Make Methode vom folgendem Programm:
Das Problem ist jetzt das wenn ich Make jetzt mache kommen bei mir immer folgender Fehler obwohl es vorher noch ging:Code:#include <asuro.h> unsigned long zurueckzeit; unsigned long timeout; unsigned char sw,sw0,sw1,sw2; int main(void) { Init(); zurueckzeit=0; timeout=Gettime()+7000; MotorDir(FWD,FWD); MotorSpeed(150,150); BackLED(OFF,OFF); FrontLED(OFF); do { sw0=PollSwitch(); sw1=PollSwitch(); sw2=PollSwitch(); if ((sw0==sw1) && (sw0==sw2)) sw=sw0; else sw=0; if (!zurueckzeit && (sw==32)) { zurueckzeit=Gettime()+750; MotorSpeed(0,0); MotorDir(RWD,RWD); MotorSpeed(90,150); BackLED(ON,OFF); } if (!zurueckzeit && (sw==16)) { zurueckzeit=Gettime()+1500; MotorSpeed(0,0); MotorDir(RWD,RWD); MotorSpeed(90,150); BackLED(ON,OFF); } if (!zurueckzeit && (sw==2)) { zurueckzeit=Gettime()+1500; MotorSpeed(0,0); MotorDir(RWD,RWD); MotorSpeed(150,90); BackLED(OFF,ON); } if (!zurueckzeit && (sw==1)) { zurueckzeit=Gettime()+750; MotorSpeed(0,0); MotorDir(RWD,RWD); MotorSpeed(150,90); BackLED(OFF,ON); } if (zurueckzeit && (Gettime() > zurueckzeit)) { zurueckzeit=0; MotorSpeed(0,0); MotorDir(FWD,FWD); MotorSpeed(150,150); BackLED(OFF,OFF); FrontLED(OFF); } if (Gettime() > timeout) { zurueckzeit=Gettime()+750; MotorSpeed(0,0); MotorDir(RWD,RWD); MotorSpeed(0,150); BackLED(ON,ON); FrontLED(ON); } if (zurueckzeit) timeout=Gettime()+7000; }while (1); return 0; }
avr-gcc -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.o test.o asuro.o --output test.elf -Wl,-Map=test.map,--cref -lm
test.o: In function `main':
H:\ASURO_src\FirstTry/test.c:12: undefined reference to `Gettime'
H:\ASURO_src\FirstTry/test.c:26: undefined reference to `Gettime'
H:\ASURO_src\FirstTry/test.c:34: undefined reference to `Gettime'
H:\ASURO_src\FirstTry/test.c:42: undefined reference to `Gettime'
H:\ASURO_src\FirstTry/test.c:50: undefined reference to `Gettime'
test.o:H:\ASURO_src\FirstTry/test.c:57: more undefined references to `Gettime' follow
make.exe: *** [test.elf] Error 1
Ich hoffe mir kann jetzt schnell einer helfen.
Mit freundlichen Grüßen
kranq







Zitieren
Lesezeichen