diff --git a/LUFA/Build/lufa.avrdude.in b/LUFA/Build/lufa.avrdude.in index 9586ae211d..dcffe84f5e 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) diff --git a/LUFA/Build/lufa.build.in b/LUFA/Build/lufa.build.in index e43996d8e7..2cdf667f33 100644 --- a/LUFA/Build/lufa.build.in +++ b/LUFA/Build/lufa.build.in @@ -161,15 +161,15 @@ hex: $(TARGET).hex $(TARGET).eep lss: $(TARGET).lss %.o: %.c - @echo $(MSG_COMPILE_CMD) Compiling C file \"$^\" + @echo $(MSG_COMPILE_CMD) Compiling C file \"$<\" $(CROSS)gcc -c $(CC_FLAGS) $(C_FLAGS) -O$(OPTIMIZATION) -std=$(C_STANDARD) $< -o $@ %.o: %.cpp - @echo $(MSG_COMPILE_CMD) Compiling C++ file \"$^\" + @echo $(MSG_COMPILE_CMD) Compiling C++ file \"$<\" $(CROSS)gcc -c $(CC_FLAGS) $(CPP_FLAGS) -O$(OPTIMIZATION) -std=$(CPP_STANDARD) -x c++ $< -o $@ %.o: %.S - @echo $(MSG_COMPILE_CMD) Assembling \"$^\" + @echo $(MSG_COMPILE_CMD) Assembling \"$<\" $(CROSS)gcc -c $(CC_FLAGS) $(ASM_FLAGS) -x assembler-with-cpp $< -o $@ .PRECIOUS : $(OBJECT_FILES) @@ -178,15 +178,15 @@ lss: $(TARGET).lss $(CROSS)gcc $^ $(CC_FLAGS) $(LD_FLAGS) -o $@ %.hex: %.elf - @echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$@\" + @echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$<\" $(CROSS)objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@ %.eep: %.elf - @echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$@\" + @echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$<\" $(CROSS)objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex $< $@ || exit 0 %.lss: %.elf - @echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$@\" + @echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$<\" $(CROSS)objdump -h -S -z $< > $@ clean: diff --git a/LUFA/Build/lufa.doxygen.in b/LUFA/Build/lufa.doxygen.in index 532bde5bd5..13055fc743 100644 --- a/LUFA/Build/lufa.doxygen.in +++ b/LUFA/Build/lufa.doxygen.in @@ -44,9 +44,11 @@ DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES MSG_DOXYGEN_CMD = ' [DOXYGEN] :' # Determine Doxygen invocation command -DOXYGEN_CMD = ( cat Doxygen.conf ; $(DOXYGEN_OVERRIDE_PARAMS:%=echo "%";)) | doxygen - +BASE_DOXYGEN_CMD = ( cat Doxygen.conf ; $(DOXYGEN_OVERRIDE_PARAMS:%=echo "%") ) | doxygen - ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y) - DOXYGEN_CMD = if ( ( cat Doxygen.conf $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then exit 1; fi; + DOXYGEN_CMD = if ( $(BASE_DOXYGEN_CMD) 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then exit 1; fi; +else + DOXYGEN_CMD = $(BASE_DOXYGEN_CMD) endif doxygen: