diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-06-02 12:21:14 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-06-02 12:21:14 +0000 |
commit | 7c75623e437ff0b9560a24dde5729c2f3b9ad57d (patch) | |
tree | 98c3546f04acbe674fd769362f270f09219ebb28 /LUFA/Build/lufa.avrdude.in | |
parent | fc3768733ee6204967234e2f0dabde6d6d80882e (diff) | |
download | lufa-7c75623e437ff0b9560a24dde5729c2f3b9ad57d.tar.gz lufa-7c75623e437ff0b9560a24dde5729c2f3b9ad57d.tar.bz2 lufa-7c75623e437ff0b9560a24dde5729c2f3b9ad57d.zip |
Add EEPROM programming target to the AVRDUDE build system module. Correct message output test for the BUILD build system module. Clean up DOXYGEN build system module logic.
Diffstat (limited to 'LUFA/Build/lufa.avrdude.in')
-rw-r--r-- | LUFA/Build/lufa.avrdude.in | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/LUFA/Build/lufa.avrdude.in b/LUFA/Build/lufa.avrdude.in index 9586ae211..dcffe84f5 100644 --- a/LUFA/Build/lufa.avrdude.in +++ b/LUFA/Build/lufa.avrdude.in @@ -7,7 +7,7 @@ #
LUFA_BUILD_MODULES += AVRDUDE
-LUFA_BUILD_TARGETS += program
+LUFA_BUILD_TARGETS += program program_ee
LUFA_BUILD_MANDATORY_VARS += MCU TARGET
LUFA_BUILD_OPTIONAL_VARS += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS
@@ -20,7 +20,10 @@ LUFA_BUILD_OPTIONAL_VARS += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS # -----------------------------------------------------------------------------
# TARGETS:
#
-# program - Program target with application using avr-dude
+# program - Program target FLASH with application using
+# avrdude
+# program_ee - Program target EEPROM with application data
+# using avrdude
#
# MANDATORY PARAMETERS:
#
@@ -42,11 +45,18 @@ TARGET ?= $(error Makefile TARGET value not set.) # Default values of optionally user-supplied variables
AVRDUDE_PROGRAMMER ?= jtagicemkii
AVRDUDE_PORT ?= usb
-AVRDUDE_FLAGS ?= -U flash:w:$(TARGET).hex
+AVRDUDE_FLAGS ?=
# Output Messages
MSG_AVRDUDE_CMD = ' [AVRDUDE] :'
+AVRDUDE_FLASH_FLAGS = -U flash:w:$< $(AVRDUDE_FLAGS)
+AVRDUDE_EEP_FLAGS = -U eeprom:w:$< $(AVRDUDE_FLAGS)
+
program: $(TARGET).hex
- @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" with settings \"$(AVRDUDE_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
- avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) $(AVRDUDE_FLAGS)
+ @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" with settings \"$(AVRDUDE_FLASH_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
+ avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) $(AVRDUDE_FLASH_FLAGS)
+
+program_ee: $(TARGET).eep
+ @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" with settings \"$(AVRDUDE_EEP_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
+ avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) $(AVRDUDE_EEP_FLAGS)
|