From f46d40f6b5dc383f09dbb8952cfa1d7dc8047d5c Mon Sep 17 00:00:00 2001 From: NicoHood Date: Mon, 2 Oct 2017 18:55:24 +0200 Subject: [PATCH] Reordered Avrdude fuses --- DMBS/avrdude.md | 10 +++++----- DMBS/avrdude.mk | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/DMBS/avrdude.md b/DMBS/avrdude.md index 10fe17c..9d6a1bb 100644 --- a/DMBS/avrdude.md +++ b/DMBS/avrdude.md @@ -30,6 +30,10 @@ The following targets are supported by this module: + + + + @@ -38,17 +42,13 @@ The following targets are supported by this module: - - - - - + diff --git a/DMBS/avrdude.mk b/DMBS/avrdude.mk index c7f624a..7b5f64a 100644 --- a/DMBS/avrdude.mk +++ b/DMBS/avrdude.mk @@ -7,10 +7,11 @@ # DMBS_BUILD_MODULES += AVRDUDE -DMBS_BUILD_TARGETS += avrdude-hfuse avrdude-efuse avrdude-lfuse avrdude-lock avrdude-fuses +DMBS_BUILD_TARGETS += avrdude-lfuse avrdude-hfuse avrdude-efuse avrdude-lock avrdude-fuses DMBS_BUILD_TARGETS += avrdude avrdude-ee avrdude-all avrdude-all-ee DMBS_BUILD_MANDATORY_VARS += MCU TARGET DMBS_BUILD_OPTIONAL_VARS += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS AVRDUDE_MEMORY AVRDUDE_BAUD +DMBS_BUILD_OPTIONAL_VARS += AVRDUDE_LFUSE AVRDUDE_HFUSE AVRDUDE_EUSE AVRDUDE_LOCK DMBS_BUILD_PROVIDED_VARS += DMBS_BUILD_PROVIDED_MACROS += @@ -23,9 +24,9 @@ AVRDUDE_PROGRAMMER ?= jtagicemkii AVRDUDE_PORT ?= usb AVRDUDE_FLAGS ?= AVRDUDE_MEMORY ?= flash +AVRDUDE_LFUSE ?= AVRDUDE_HFUSE ?= AVRDUDE_EFUSE ?= -AVRDUDE_LFUSE ?= AVRDUDE_LOCK ?= AVRDUDE_BAUD ?= @@ -40,10 +41,9 @@ $(call ERROR_IF_EMPTY, AVRDUDE_PORT) MSG_AVRDUDE_CMD := ' [AVRDUDE] :' # Construct base avrdude command flags -ifeq ($(AVRDUDE_BAUD),) - BASE_AVRDUDE_FLAGS := -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -else - BASE_AVRDUDE_FLAGS := -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -b $(AVRDUDE_BAUD) +BASE_AVRDUDE_FLAGS := -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) +ifneq ($(AVRDUDE_BAUD),) + BASE_AVRDUDE_FLAGS += -b $(AVRDUDE_BAUD) endif # Programs in the target FLASH memory using AVRDUDE @@ -57,6 +57,11 @@ avrdude-ee: $(TARGET).eep $(MAKEFILE_LIST) avrdude $(BASE_AVRDUDE_FLAGS) -U eeprom:w:$< $(AVRDUDE_FLAGS) # Programs in the target fuses using AVRDUDE +avrdude-lfuse: $(MAKEFILE_LIST) + @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" low fuse using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\" + $(call ERROR_IF_EMPTY, AVRDUDE_LFUSE) + avrdude $(BASE_AVRDUDE_FLAGS) -Ulfuse:w:$(AVRDUDE_LFUSE):m $(AVRDUDE_FLAGS) + avrdude-hfuse: $(MAKEFILE_LIST) @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" high fuse using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\" $(call ERROR_IF_EMPTY, AVRDUDE_HFUSE) @@ -67,17 +72,12 @@ avrdude-efuse: $(MAKEFILE_LIST) $(call ERROR_IF_EMPTY, AVRDUDE_EFUSE) avrdude $(BASE_AVRDUDE_FLAGS) -Uefuse:w:$(AVRDUDE_EFUSE):m $(AVRDUDE_FLAGS) -avrdude-lfuse: $(MAKEFILE_LIST) - @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" low fuse using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\" - $(call ERROR_IF_EMPTY, AVRDUDE_LFUSE) - avrdude $(BASE_AVRDUDE_FLAGS) -Ulfuse:w:$(AVRDUDE_LFUSE):m $(AVRDUDE_FLAGS) - avrdude-lock: $(MAKEFILE_LIST) @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" lock bits using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\" $(call ERROR_IF_EMPTY, AVRDUDE_LOCK) avrdude $(BASE_AVRDUDE_FLAGS) -Ulock:w:$(AVRDUDE_LOCK):m $(AVRDUDE_FLAGS) -avrdude-fuses: avrdude-hfuse avrdude-efuse avrdude-lfuse avrdude-lock +avrdude-fuses: avrdude-lfuse avrdude-hfuse avrdude-efuse avrdude-lock avrdude-all: avrdude avrdude-fuses
avrdude-lfuseProgram the device low fuse. Requires AVRDUDE_LFUSE variable set.
avrdude-hfuse Program the device high fuse. Requires AVRDUDE_HFUSE variable set.avrdude-efuse Program the device extended fuse. Requires AVRDUDE_EFUSE variable set.
avrdude-lfuseProgram the device low fuse. Requires AVRDUDE_LFUSE variable set.
avrdude-lock Program the device lock bits. Requires AVRDUDE_LOCK variable set.
avrdude-fusesProgram the device fuses (hfuse, efuse, lfuse, lock bits).Program the device fuses (lfuse, hfuse, efuse, lock bits).
avrdude