all : program.lst test.hex burn PART=attiny44 PROGPART=t44 CFLAGS=-g -Wall -pedantic -O2 -mmcu=$(PART) -DF_CPU=20000000UL CC=avr-gcc test.elf : test.o Functions.o avr-gcc -I $(CFLAGS) -Wl,-Map,test.map -o $@ $^ -L/usr/lib/binutils/avr/2.18 test.hex : test.elf avr-objcopy -j .text -j .data -O ihex test.elf test.hex burn : test.hex avrdude -c usbtiny -p $(PROGPART) -U flash:w:test.hex # if you get the part borked, type -B 1024 and it will go REALLY slow readfuses : avrdude -c usbtiny -p $(PROGPART) -U hfuse:r:high.txt:b -U lfuse:r:low.txt:b clean : rm -f *~ high.txt low.txt test.hex test.map test.elf *.o burnfuses : avrdude -c usbtiny -p t44 -U lfuse:w:0xfe:m -U hfuse:w:0xdf:m program.lst : test.c Functions.c avr-gcc -c -g -Wa,-a,-ad $(CFLAGS) $^ > $@