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:
parent
7f3c1e61ba
commit
55132c0458
12
Makefile
12
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 \
|
||||
|
|
|
|||
Loading…
Reference in New Issue