ich hatte mein Problem schon im Mikrocopter Forum geschildert - war aber dort falsch.
Also hier nochmal die Zusammenfassung:
Ich bin über Elektor auf die Heizungssteuerung aufmerksam geworden, ist genau was ich gesucht habe.
Ich möchte eine Kleine Wärmepumpe damit steuern und muß dazu das Programm noch etwas modifizieren. Die Hysterese für Ts /1,5 C ist dafür zu gering.
Ich habe das Problem, das ich das geänderte main.c und "was dazu gehört" nicht kompilieren kann.
Das programmieren des MEGA32 mit der Software aus dem Download Bereich hat einfach mit PonyProg funktioniert.
Ich habe unter WinXP WinAVR-20071221-install.exe installiert und bekomme beim kompilieren der main.c für die Heizungssteuerung diverse Fehlermeldungen.
Unter OpenSuse mit binutils-2.17, gcc-core-4.1.2 und avr-libc-1.6.2 ist es ebenso.
Zu Testzwecken habe ich ein einfaches Beispiel mit Hilfe des Avr-GCC Tutorials ausprobiert - da läuft alles glatt durch.
Weshalb werden z.B. die Headerdateien nicht gefunden und woher bekomme ich die mega32.h?
Oder liegt es daran, das der Quellcode nicht zu WinAVR "passt"?
Hier die Ausgabe mit WinAVR:
> "make.exe" all
-------- begin --------
avr-gcc (GCC) 4.2.2 (WinAVR 20071221)
Copyright (C) 2007 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=atmega32 -I. -gstabs -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./main.lst -std=gnu99 -Wundef -MMD -MP -MF .dep/main.o.d main.c -o main.o
main.c:21:20: warning: mega32.h: No such file or directory
main.c:23:19: warning: delay.h: No such file or directory
main.c:31:42: warning: lcd.h: No such file or directory
main.c:32:2: error: invalid preprocessing directive #asm
main.c:33: error: expected identifier or '(' before '.' token
main.c:34:2: error: invalid preprocessing directive #endasm
main.c:42: warning: data definition has no type or storage class
main.c:42: warning: type defaults to 'int' in declaration of 'struct_daten'
main.c:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'struct_daten'
main.c:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
main.c:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Polling100ms'
main.c:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
main.c:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
main.c:62: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MenuPolling'
main.c:63: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'RefreshDisplay'
main.c:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PollingMinute'
main.c:65: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PollingTag'
main.c:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SendeDaten'
main.c:67: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Output'
main.c:68: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SendeDisplay'
main.c:90: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
main.c:91: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
main.c:92: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
main.c:100: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'signed'
main.c:104: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'signed'
main.c:105: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'signed'
main.c:106: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'signed'
main.c:107: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'signed'
main.c:108: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'signed'
main.c:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
main.c:115: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
main.c:126: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
main.c:137: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
main.c:149: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
main.c:161: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
main.c:188: error: expected ';', ',' or ')' before '*' token
main.c: In function 'LCDInit':
main.c:202: warning: implicit declaration of function 'lcd_init'
main.c:204: warning: implicit declaration of function 'LCD_UserChar'
main.c:204: error: 'lcd_char0' undeclared (first use in this function)
main.c:204: error: (Each undeclared identifier is reported only once
main.c:204: error: for each function it appears in.)
main.c:205: error: 'lcd_char1' undeclared (first use in this function)
main.c:206: error: 'lcd_char2' undeclared (first use in this function)
main.c:207: error: 'lcd_char3' undeclared (first use in this function)
main.c:208: error: 'lcd_char4' undeclared (first use in this function)
main.c: At top level:
main.c:217: error: expected declaration specifiers or '...' before '(' token
main.c:218: error: conflicting types for 'fputc'
main.c: In function 'fputc':
main.c:219: error: 'Output' undeclared (first use in this function)
main.c:219: warning: implicit declaration of function 'lcd_putchar'
main.c:222:6: error: invalid preprocessing directive #asm
main.c:223: error: 'sbis' undeclared (first use in this function)
main.c:223: error: expected ';' before 'usr'
main.c:227:2: error: invalid preprocessing directive #endasm
main.c: At top level:
main.c:231: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
main.c: In function 'Raw_INT':
main.c:239: error: 'Output' undeclared (first use in this function)
main.c:244: error: too many arguments to function 'fputc'
main.c:245: error: too many arguments to function 'fputc'
main.c:250: error: too many arguments to function 'fputc'
main.c:253: error: 'disp_wert' undeclared (first use in this function)
main.c:255: error: too many arguments to function 'fputc'
main.c:262: error: too many arguments to function 'fputc'
main.c:267: error: too many arguments to function 'fputc'
main.c:268: error: too many arguments to function 'fputc'
main.c:272: error: too many arguments to function 'fputc'
main.c: In function 'read_adc':
main.c:281: error: 'ADMUX' undeclared (first use in this function)
main.c:282: error: 'ADCSR' undeclared (first use in this function)
main.c:282: error: expected ';' before numeric constant
main.c:283: error: expected ')' before numeric constant
main.c:284: error: expected ';' before numeric constant
main.c:285: error: 'ADCW' undeclared (first use in this function)
main.c: In function 'GetTemperatur':
main.c:296: error: 'PollingMinute' undeclared (first use in this function)
main.c: At top level:
main.c:311: error: 'TIM2_COMP' undeclared here (not in a function)
main.c:311: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
main.c:342: error: 'USART_TXC' undeclared here (not in a function)
main.c:342: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
main.c:346: error: 'USART_RXC' undeclared here (not in a function)
main.c:346: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
main.c: In function 'Tastatur':
main.c:395: error: 'PINA' undeclared (first use in this function)
main.c:395: error: expected ')' before numeric constant
main.c:396: error: expected ')' before numeric constant
main.c:399: error: expected ')' before numeric constant
main.c:400: error: expected ')' before numeric constant
main.c: In function 'ErmittleBetriebsMode':
main.c:410: error: 'Timer' undeclared (first use in this function)
main.c:410: error: 'SchichtOffset' undeclared (first use in this function)
main.c: In function 'MenuIstData':
main.c:425: error: 'MenuPolling' undeclared (first use in this function)
main.c:426: warning: implicit declaration of function 'lcd_gotoxy'
main.c:426: warning: implicit declaration of function 'lcd_putsf'
main.c:432: error: 'RefreshDisplay' undeclared (first use in this function)
main.c:434: error: 'Tag' undeclared (first use in this function)
main.c:496: warning: suggest explicit braces to avoid ambiguous 'else'
main.c: In function 'EditTimer':
main.c:517: error: 'SchichtOffset' undeclared (first use in this function)
main.c:519: error: 'MenuPolling' undeclared (first use in this function)
main.c:525: error: 'Timer' undeclared (first use in this function)
main.c:526: error: 'Tag' undeclared (first use in this function)
main.c:577: warning: suggest explicit braces to avoid ambiguous 'else'
main.c: In function 'ZeigTimer':
main.c:602: error: 'SchichtOffset' undeclared (first use in this function)
main.c:604: error: 'Timer' undeclared (first use in this function)
main.c: In function 'TimerMenu':
main.c:619: error: 'MenuPolling' undeclared (first use in this function)
main.c:634: error: 'Timer' undeclared (first use in this function)
main.c:635: error: 'Tag' undeclared (first use in this function)
main.c:637: error: 'SchichtOffset' undeclared (first use in this function)
main.c: In function 'SchichtMenu':
main.c:694: error: 'MenuPolling' undeclared (first use in this function)
main.c:700: error: 'SchichtOffset' undeclared (first use in this function)
main.c: In function 'TemperaturMenu':
main.c:716: error: 'MenuPolling' undeclared (first use in this function)
main.c:725: error: 'MaxKesselTemperatur' undeclared (first use in this function)
main.c:726: error: 'MinKesselTemperatur' undeclared (first use in this function)
main.c:727: error: 'KennlinieTemperaturOben' undeclared (first use in this function)
main.c:728: error: 'KennlinieTemperaturUnten' undeclared (first use in this function)
main.c:734: warning: suggest explicit braces to avoid ambiguous 'else'
main.c:741: warning: suggest explicit braces to avoid ambiguous 'else'
main.c:770: warning: suggest explicit braces to avoid ambiguous 'else'
main.c: In function 'PumpenMenu':
main.c:778: error: 'MenuPolling' undeclared (first use in this function)
main.c:783:33: warning: hex escape sequence out of range
main.c:804: error: 'PumpeEinTemperatur' undeclared (first use in this function)
main.c: In function 'HistoryMenu':
main.c:834: error: 'MenuPolling' undeclared (first use in this function)
main.c:837: error: 'ZeigerRingspeicher' undeclared (first use in this function)
main.c:842: error: 'VerbrauchsRingSpeicher' undeclared (first use in this function)
main.c:843: error: 'TemperaturRingSpeicher' undeclared (first use in this function)
main.c:847: error: 'RefreshDisplay' undeclared (first use in this function)
main.c: In function 'MenuAuswahl':
main.c:870: error: 'RefreshDisplay' undeclared (first use in this function)
main.c:896:27: warning: hex escape sequence out of range
main.c:905: warning: suggest explicit braces to avoid ambiguous 'else'
main.c:910: error: 'MenuPolling' undeclared (first use in this function)
main.c: In function 'GetRegelpunkt':
main.c:920: error: 'KennlinieTemperaturOben' undeclared (first use in this function)
main.c:922: error: 'MaxKesselTemperatur' undeclared (first use in this function)
main.c:925: error: 'KennlinieTemperaturUnten' undeclared (first use in this function)
main.c:927: error: 'MinKesselTemperatur' undeclared (first use in this function)
main.c: In function 'SteuerRelais':
main.c:944: error: 'KesselHysterese' undeclared (first use in this function)
main.c:944: error: 'PORTB' undeclared (first use in this function)
main.c:944: error: expected ';' before numeric constant
main.c:945: error: expected ';' before numeric constant
main.c:949: error: 'PumpeEinTemperatur' undeclared (first use in this function)
main.c:950: error: expected ';' before numeric constant
main.c:953: error: expected ';' before numeric constant
main.c: In function 'Menu':
main.c:969: error: 'MenuPolling' undeclared (first use in this function)
main.c: In function 'InitEEPROM':
main.c:1008: error: 'CheckEEpromData' undeclared (first use in this function)
main.c:1010: warning: implicit declaration of function 'lcd_clear'
main.c:1015: warning: implicit declaration of function 'delay_ms'
main.c:1017: error: 'Timer' undeclared (first use in this function)
main.c:1033: error: 'MaxKesselTemperatur' undeclared (first use in this function)
main.c:1034: error: 'MinKesselTemperatur' undeclared (first use in this function)
main.c:1035: error: 'KennlinieTemperaturOben' undeclared (first use in this function)
main.c:1036: error: 'KennlinieTemperaturUnten' undeclared (first use in this function)
main.c:1037: error: 'PumpeEinTemperatur' undeclared (first use in this function)
main.c:1051: error: 'SchichtOffset' undeclared (first use in this function)
main.c:1054: error: 'VerbrauchsRingSpeicher' undeclared (first use in this function)
main.c:1055: error: 'TemperaturRingSpeicher' undeclared (first use in this function)
main.c:1057: error: 'ZeigerRingspeicher' undeclared (first use in this function)
main.c: In function 'SpeicherVerbrauch':
main.c:1067: error: 'VerbrauchsRingSpeicher' undeclared (first use in this function)
main.c:1067: error: 'ZeigerRingspeicher' undeclared (first use in this function)
main.c:1068: error: 'TemperaturRingSpeicher' undeclared (first use in this function)
main.c: At top level:
main.c:1078: warning: return type of 'main' is not 'int'
main.c: In function 'main':
main.c:1087: error: 'PORTA' undeclared (first use in this function)
main.c:1088: error: 'DDRA' undeclared (first use in this function)
main.c:1093: error: 'PORTB' undeclared (first use in this function)
main.c:1094: error: 'DDRB' undeclared (first use in this function)
main.c:1099: error: 'PORTC' undeclared (first use in this function)
main.c:1100: error: 'DDRC' undeclared (first use in this function)
main.c:1105: error: 'PORTD' undeclared (first use in this function)
main.c:1106: error: 'DDRD' undeclared (first use in this function)
main.c:1113: error: 'TCCR0' undeclared (first use in this function)
main.c:1114: error: 'TCNT0' undeclared (first use in this function)
main.c:1115: error: 'OCR0' undeclared (first use in this function)
main.c:1125: error: 'TCCR1A' undeclared (first use in this function)
main.c:1126: error: 'TCCR1B' undeclared (first use in this function)
main.c:1127: error: 'TCNT1H' undeclared (first use in this function)
main.c:1128: error: 'TCNT1L' undeclared (first use in this function)
main.c:1129: error: 'OCR1AH' undeclared (first use in this function)
main.c:1130: error: 'OCR1AL' undeclared (first use in this function)
main.c:1131: error: 'OCR1BH' undeclared (first use in this function)
main.c:1132: error: 'OCR1BL' undeclared (first use in this function)
main.c:1139: error: 'ASSR' undeclared (first use in this function)
main.c:1140: error: 'TCCR2' undeclared (first use in this function)
main.c:1141: error: 'TCNT2' undeclared (first use in this function)
main.c:1142: error: 'OCR2' undeclared (first use in this function)
main.c:1157: error: 'TIMSK' undeclared (first use in this function)
main.c:1165: error: 'UCSRA' undeclared (first use in this function)
main.c:1166: error: 'UCSRB' undeclared (first use in this function)
main.c:1167: error: 'UCSRC' undeclared (first use in this function)
main.c:1168: error: 'UBRRH' undeclared (first use in this function)
main.c:1169: error: 'UBRRL' undeclared (first use in this function)
main.c:1175: error: 'ACSR' undeclared (first use in this function)
main.c:1176: error: 'SFIOR' undeclared (first use in this function)
main.c:1182: error: 'ADCSRA' undeclared (first use in this function)
main.c:1187: error: 'PINA' undeclared (first use in this function)
main.c:1187: error: expected ')' before numeric constant
main.c:1187: error: 'CheckEEpromData' undeclared (first use in this function)
main.c:1200:2: error: invalid preprocessing directive #asm
main.c:1215: error: expected ';' before numeric constant
main.c:1215: error: expected ';' before numeric constant
main.c:1216: error: expected ';' before numeric constant
main.c:1216: error: expected ';' before numeric constant
main.c:1217: error: expected ';' before numeric constant
main.c:1217: error: expected ';' before numeric constant
main.c:1219: error: 'PollingTag' undeclared (first use in this function)
main.c:1224: error: 'SendeDisplay' undeclared (first use in this function)
main.c:1230: error: 'Output' undeclared (first use in this function)
main.c:1232: warning: implicit declaration of function 'lcd_write_byte'
main.c:1232: error: 'PINB' undeclared (first use in this function)
main.c:1233: warning: implicit declaration of function 'lcd_read_byte'
main.c:1233: error: too many arguments to function 'fputc'
main.c:1234: error: too many arguments to function 'fputc'
main.c:1235: error: too many arguments to function 'fputc'
main.c:1236: error: too many arguments to function 'fputc'
main.c:1246: error: 'SendeDaten' undeclared (first use in this function)
main.c:1250: error: 'ZeigerRingspeicher' undeclared (first use in this function)
main.c:1255: warning: implicit declaration of function 'putsf'
main.c:1261: error: 'VerbrauchsRingSpeicher' undeclared (first use in this function)
main.c:1263: error: too many arguments to function 'fputc'
main.c:1264: error: 'TemperaturRingSpeicher' undeclared (first use in this function)
main.c:1264: error: too many arguments to function 'fputc'
make.exe: *** [main.o] Error 1
> Process Exit Code: 2
> Time Taken: 00:01
Was mache ich falsch?
English translation
Aktive Beiträge
= SUCHE =
SVN
Bilder
Chat
Map
Registrieren
LOGIN
