Hallo zusammen, Sitze jetzt schon seit zwei Tagen daran meinen funktionierenden Quellcode in mehrere C-Dateien aufzuteilen. Leider funktionierts immer noch nicht. Bei Compilieren bekomme ich immer ne ganze Reihe Fehlermeldungen ausgegeben und obwohl ich schon wie ein Verrückter Forenbeiträge gegoogelt hab komme ich immer noch nicht drauf welchen Fehler ich begehe: avr-gcc (WinAVR 20100110) 4.3.3 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 C: main.c avr-gcc -c -mmcu=atmega2560 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./main.lst -std=gnu99 -MMD -MP -MF .dep/main.o.d main.c -o main.o main.c: In function 'uart_init': main.c:24: error: parameter 'uart_str_complete' is initialized main.c:25: error: parameter 'uart_str_count' is initialized main.c:26: error: parameter 'uart_string' is initialized main.c:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token main.c:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token main.c:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token main.c:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token main.c:74: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token main.c:84: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token main.c:93: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token main.c:167: warning: 'signal' attribute only applies to functions main.c:167: warning: 'used' attribute ignored main.c:167: warning: 'externally_visible' attribute ignored main.c:168: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token main.c:186: warning: 'signal' attribute only applies to functions main.c:186: warning: 'used' attribute ignored main.c:186: warning: 'externally_visible' attribute ignored main.c:187: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token main.c:208: error: old-style parameter declarations in prototyped function definition main.c:208: error: expected '{' at end of input make.exe: *** [main.o] Error 1 > Process Exit Code: 2 > Time Taken: 00:00
Da
init.h
> void uart_init(void)
fehlt schon mal ein Semikolon.
Hey, Danke für die prompte Hilfe. Jetzt funktionierts nachdem ich die avr/io.h noch in meine init.c eigebunden hab Gruß Andreas
Andreas H. schrieb: >Jetzt funktionierts nachdem ich die > avr/io.h noch in meine init.c eigebunden hab Die ist da doch schon drin?!?
Hast recht, hatte da in der Zwischenzeit noch was anderes ausprobiert
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.