Hallo allerseits,
ich bin gerade dabei mir avr-gcc einzurichten, nach dieser Anleitung:
Hier rennt ArchLinux mit nem aktuellen Kernel, der Rest ist auch up to date.
$PATH ist entsprechend erweitert.
binutils und avr-gcc-core habe ich genau nach Anleitung (incl. identischer Pfade) installiert, keine Probleme.
Danach habe ich mir die avr-libc vorgenommen. Da scheint obige Anleitung nicht ganz aktuell zu sein, da die mitgelieferte INSTALL was anderes sagt:
./configure --build=`./config.guess` --host=avr [other options]
Ok, also noch den Zielpfad angepasst und los: ../configure --prefix=/usr/local/avr --build=`./config.guess` --host=avr
Lief auch soweit sauber durch incl. install.
Danach habe ich mir das Sample blink.c incl. Makefile von obiger Seite kopiert und versuche es zu übersetzen:
[root@laptop Blinker]# ls -l insgesamt 8-rw-r--r-- 1 naumannu users 511 12. Feb 21:07 Makefile
-rw-r--r-- 1 naumannu users 584 12. Feb 20:36 blink.c [root@laptop Blinker]# make make: *** Keine Regel vorhanden, um das Target »blink.out«, benötigt von »blink.hex«, zu erstellen. Schluss. [root@laptop Blinker]#
Peng, nix geht. Hat jemand ne Idee wo genau mein Problem liegt?
Hier nochmal die Makefile, sollte aber passen (incl. Tabs): TARGET = blink MCU = attiny2313 CC = avr-gcc OBJCOPY=avr-objcopy CFLAGS =-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues
-save-temps -fno-common
all: $(TARGET).hex
$(TARGET).hex : $(TARGET).out $(OBJCOPY) -j .data -j .text -O ihex $@ $^
$(TARGET).elf: $(TARGET).o $(CC) $(CFLAGS) -o $@ -Wl,-Map,$(TARGET).map $^
$(TARGET).o : $(TARGET).c $(CC) $(CFLAGS) -c $^
load: $(TARGET).hex avrdude -p t2313 -c avr910 -U flash:w:$(TARGET).hex -v
clean: rm -f *.o *.map *.elf *.hex *.s *.i