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.
This commit is contained in:
Markus Hitter 2012-07-13 23:34:06 +02:00
parent 7f3c1e61ba
commit 55132c0458
1 changed files with 2 additions and 10 deletions

View File

@ -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 \