X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/79ee9e755f1ca58d9b8c30d676ca117b5ae3d9f4..59ca4ec0ec2376c3e94793ccb43487ecd036e1e7:/LUFA/Build/lufa.dfu.in diff --git a/LUFA/Build/lufa.dfu.in b/LUFA/Build/lufa.dfu.in index ac5edeadc..c3a102be8 100644 --- a/LUFA/Build/lufa.dfu.in +++ b/LUFA/Build/lufa.dfu.in @@ -36,16 +36,14 @@ LUFA_BUILD_OPTIONAL_VARS += # # ----------------------------------------------------------------------------- -# Output Messages -MSG_DFU_CMD = ' [DFU] :' +# Sanity-check values of mandatory user-supplied variables +MCU ?= $(error Makefile MCU value not set.) +TARGET ?= $(error Makefile TARGET value not set.) -# 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 +# Output Messages +MSG_COPY_CMD = ' [CP] :' +MSG_REMOVE_CMD = ' [RM] :' +MSG_DFU_CMD = ' [DFU] :' 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