From 55132c0458616e2f94a4b1cf733c227e54c17c02 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Fri, 13 Jul 2012 23:34:06 +0200 Subject: [PATCH] Makefile: don't provide means for programming fuses. Programming fuses doesn't belong to the firmware or to firmware uploading. Fuses have to match the hardware and the bootloader, so they should be set when setting up these. --- Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 54d0d01..a56244d 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ endif OBJ = $(patsubst %.c,%.o,${SOURCES}) -.PHONY: all program clean size subdirs program-fuses doc functionsbysize +.PHONY: all program clean size subdirs doc functionsbysize .PRECIOUS: %.o %.elf all: config.h subdirs $(PROGRAM).hex $(PROGRAM).lst $(PROGRAM).sym size @@ -144,16 +144,8 @@ program: $(PROGRAM).hex config.h $(AVRDUDE) -c$(PROGID) $(PROGBAUD_FLAG) -p$(MCU_TARGET) -P$(PROGPORT) -C$(AVRDUDECONF) -U flash:w:$^ stty 115200 raw ignbrk -hup -echo ixoff < $(PROGPORT) -program-fuses: - avr-objdump -s -j .fuse mendel.o | perl -ne '/\s0000\s([0-9a-f]{2})/ && print "$$1\n"' > lfuse - avr-objdump -s -j .fuse mendel.o | perl -ne '/\s0000\s..([0-9a-f]{2})/ && print "$$1\n"' > hfuse - avr-objdump -s -j .fuse mendel.o | perl -ne '/\s0000\s....([0-9a-f]{2})/ && print "$$1\n"' > efuse - $(AVRDUDE) -c$(PROGID) $(PROGBAUD_FLAG) -p$(MCU_TARGET) -P$(PROGPORT) -C$(AVRDUDECONF) -U lfuse:w:lfuse - $(AVRDUDE) -c$(PROGID) $(PROGBAUD_FLAG) -p$(MCU_TARGET) -P$(PROGPORT) -C$(AVRDUDECONF) -U hfuse:w:hfuse - $(AVRDUDE) -c$(PROGID) $(PROGBAUD_FLAG) -p$(MCU_TARGET) -P$(PROGPORT) -C$(AVRDUDECONF) -U efuse:w:efuse - clean: clean-subdirs - rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex *.al *.i *.s *~ *fuse + rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex *.al *.i *.s *~ clean-subdirs: @for dir in $(SUBDIRS); do \