Der Thread ist zwar schon älter, wollte aber keinen neuen Thread aufmachen.
Habe ein ähnliches Problem, aber bei mir fehlt der Eintrag "# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c "
Ich habe nicht den Mega8 sondern den Mega32. Die Makefile hänge ich einmal an.
Ich verwende die AVRlib (nicht avrlibc). Es war eine makefile bei einem Beispiel dabei (hochgeladen als makefile_2), hat aber nichts genutzt. Ich habe Versuchsweiße in die Original Makefile den Ausschnitt
eingefügt, ohne Erfolg.Code:########### you should not need to change the following line ############# include $(AVRLIB)/make/avrproj_make ###### dependecies, add any dependencies you need here ################### # Dependencies tell the compiler which files in your code depend on which # other files. When you change a piece of code, the dependencies allow # the compiler to intelligently figure out which files are affected and # need to be recompiled. You should only list the dependencies of *.o # files. For example: uart.o is the compiled output of uart.c and uart.h # and therefore, uart.o "depends" on uart.c and uart.h. But the code in # uart.c also uses information from global.h, so that file should be listed # in the dependecies too. That way, if you alter global.h, uart.o will be # recompiled to take into account the changes. buffer.o : buffer.c buffer.h uart.o : uart.c uart.h global.h UART2.o : UART2.c UART2.h global.h rprintf.o : rprintf.c rprintf.h a2d.o : a2d.c a2d.h timer.o : timer.c timer.h global.h pulse.o : pulse.c pulse.h timer.h global.h lcd.o : lcd.c lcd.h global.h i2c.o : i2c.c i2c.h global.h spi.o : spi.c spi.h global.h swpwm.o : swpwm.c swpwm.h global.h servo.o : servo.c servo.h global.h swuart.o : swuart.c swuart.h global.h tsip.o : tsip.c tsip.h global.h nmea.o : nmea.c nmea.h global.h vt100.o : vt100.c vt100.h global.h gps.o : gps.c gps.h global.h $(TRG).o : $(TRG).c global.h
In der C-Datei steht
In der Headerdatei stehtCode:#include <a2d.h> int main(void) { a2dInit(); a2dSetReference(ADC_REFERENCE_AREF); ..... }
Eine a2d.c ist auch dabei, die ich mit der makefile-Datei mit einbinden wollte, ohne Erfolg.Code:#define ADC_REFERENCE_AREF 0x00 ///< 0x00 -> AREF pin, internal VREF turned off void a2dInit(void); void a2dSetReference(unsigned char ref);
Hat einer einen Vorschlag, was ich noch versuchen könnte?
MfG Hannes







Zitieren

Lesezeichen