aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Build/lufa.dfu.in
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-06-02 12:00:51 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-06-02 12:00:51 +0000
commit29874f6db7db635e3cb6ee39a595334fc1c6514a (patch)
tree1609dc340b5786b3562d8f7f84db9f882575d9a1 /LUFA/Build/lufa.dfu.in
parent276eb35d68f6fc9b3c252c17327c8d18ff7017e3 (diff)
downloadlufa-29874f6db7db635e3cb6ee39a595334fc1c6514a.tar.gz
lufa-29874f6db7db635e3cb6ee39a595334fc1c6514a.tar.bz2
lufa-29874f6db7db635e3cb6ee39a595334fc1c6514a.zip
Simplify build system mandatory parameter/variable sanity checks.
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