From 29874f6db7db635e3cb6ee39a595334fc1c6514a Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sat, 2 Jun 2012 12:00:51 +0000 Subject: Simplify build system mandatory parameter/variable sanity checks. --- LUFA/Build/lufa.dfu.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'LUFA/Build/lufa.dfu.in') 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 -- cgit v1.2.3