aboutsummaryrefslogtreecommitdiff
path: root/arduino-mk/Arduino.mk
diff options
context:
space:
mode:
authorSimon John <git@the-jedi.co.uk>2013-12-15 21:10:58 +0000
committerSudar <sudar@sudarmuthu.com>2013-12-16 23:14:32 +0530
commit7ea19ce3229fd357f6c475bb54bbf19cb0c90356 (patch)
tree9d5543641068d82e6001f1bc2d3874fe813e77e6 /arduino-mk/Arduino.mk
parent25a00d73b704d9d0af0f971587b3e39016e395e0 (diff)
Add option to set fuses without burning a bootloader
When using ICSP programmers e.g. usbasp, you can burn sketches directly to the chip without having to burn a bootloader, however you do need to set fuses e.g. if you're changing speed/BOD. Updated help text to include "make set_fuses" and also changed "make burn_bootloader" help text which wasn't entirely accurate. Fix #141
Diffstat (limited to 'arduino-mk/Arduino.mk')
-rw-r--r--arduino-mk/Arduino.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index 1ba2b81..67b3eaa 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -1143,6 +1143,14 @@ ifneq ($(strip $(AVRDUDE_ISP_FUSES_POST)),)
$(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) $(AVRDUDE_ISP_FUSES_POST)
endif
+set_fuses:
+ifneq ($(strip $(AVRDUDE_ISP_FUSES_PRE)),)
+ $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) -e $(AVRDUDE_ISP_FUSES_PRE)
+endif
+ifneq ($(strip $(AVRDUDE_ISP_FUSES_POST)),)
+ $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) $(AVRDUDE_ISP_FUSES_POST)
+endif
+
clean:
$(REMOVE) $(LOCAL_OBJS) $(CORE_OBJS) $(LIB_OBJS) $(CORE_LIB) $(TARGETS) $(DEPS) $(USER_LIB_OBJS) ${OBJDIR}
@@ -1193,7 +1201,8 @@ help:
the capacity of the micro controller.\n\
make eeprom - upload the eep file\n\
make raw_eeprom - upload the eep file without first resetting\n\
- make burn_bootloader - Burn bootloader and/or fuses\n\
+ make burn_bootloader - burn bootloader and fuses\n\
+ make set_fuses - set fuses without burning bootloader\n\
make help - show this help\n\
"
@$(ECHO) "Please refer to $(ARDMK_FILE) for more details.\n"