aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Build/lufa.dfu.in
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Build/lufa.dfu.in')
-rw-r--r--LUFA/Build/lufa.dfu.in14
1 files changed, 7 insertions, 7 deletions
diff --git a/LUFA/Build/lufa.dfu.in b/LUFA/Build/lufa.dfu.in
index ac5edeadc..8c478db84 100644
--- a/LUFA/Build/lufa.dfu.in
+++ b/LUFA/Build/lufa.dfu.in
@@ -37,15 +37,13 @@ LUFA_BUILD_OPTIONAL_VARS +=
# -----------------------------------------------------------------------------
# Output Messages
-MSG_DFU_CMD = ' [DFU] :'
+MSG_COPY_CMD = ' [CP] :'
+MSG_REMOVE_CMD = ' [RM] :'
+MSG_DFU_CMD = ' [DFU] :'
# Sanity check the user MCU and TARGET makefile options
-ifeq ($(MCU),)
- $(error Makefile MCU value not set.)
-endif
-ifeq ($(TARGET),)
- $(error Makefile TARGET value not set.)
-endif
+MCU ?= $(error Makefile MCU value not set.)
+TARGET ?= $(error Makefile TARGET value not set.)
flip: $(TARGET).hex
@echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$(TARGET).hex\"
@@ -54,11 +52,13 @@ flip: $(TARGET).hex
batchisp -hardware usb -device $(MCU) -operation start reset 0
flip-ee: $(TARGET).eep
+ @echo $(MSG_DFU_CMD) Copying EEP file to temporary file \"$(TARGET)eep.hex\"
cp $(TARGET).eep $(TARGET)eep.hex
@echo $(MSG_DFU_CMD) Programming EEPROM with batchisp using \"$(TARGET).eep\"
batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase
batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program
batchisp -hardware usb -device $(MCU) -operation start reset 0
+ @echo $(MSG_DFU_CMD) Removing temporary file \"$(TARGET)eep.hex\"
rm $(TARGET)eep.hex
dfu: $(TARGET).hex