|
|
|
@ -37,15 +37,13 @@ LUFA_BUILD_OPTIONAL_VARS +=
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# Output Messages
|
|
|
|
|
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
|
|
|
|
|