Hallo woodghost,
haben ein test.c Program zum testen der Kollisiontaster versucht zu
compelieren und kommen mit der Fehlermeldung :
parse error before "while" nicht klar.
Vielleicht liegt das an dem vorhandenen Ubuntu avr-gcc![]()
Hier ein AuszugGruss volpeCode:peter@KPF:~/ASURO/FirstTry$ sudo nano test.c #include "asuro.h" int main(void){ Init() while(1){ if(PollSwitch()>0){StatusLED(RED);} else{StatusLED(GREEN);} } } peter@KPF:~/ASURO/FirstTry$ make set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c \ | sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > test.d; \ [ -s test.d ] || rm -f test.d -------- begin -------- avr-gcc --version 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. Size before: test.elf : section size addr .text 1546 0 .data 0 8388704 .bss 1 8388704 .noinit 0 8388705 .eeprom 0 8454144 .stab 8496 0 .stabstr 2860 0 Total 12903 avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c -o test.o test.c: In function `main': test.c:4: error: parse error before "while" make: *** [test.o] Fehler 1






Zitieren

Lesezeichen