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.

pull/1469/head
Dean Camera 13 years ago
parent fc3768733e
commit 7c75623e43

@ -7,7 +7,7 @@
# #
LUFA_BUILD_MODULES += AVRDUDE LUFA_BUILD_MODULES += AVRDUDE
LUFA_BUILD_TARGETS += program LUFA_BUILD_TARGETS += program program_ee
LUFA_BUILD_MANDATORY_VARS += MCU TARGET LUFA_BUILD_MANDATORY_VARS += MCU TARGET
LUFA_BUILD_OPTIONAL_VARS += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS 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: # 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: # MANDATORY PARAMETERS:
# #
@ -42,11 +45,18 @@ TARGET ?= $(error Makefile TARGET value not set.)
# Default values of optionally user-supplied variables # Default values of optionally user-supplied variables
AVRDUDE_PROGRAMMER ?= jtagicemkii AVRDUDE_PROGRAMMER ?= jtagicemkii
AVRDUDE_PORT ?= usb AVRDUDE_PORT ?= usb
AVRDUDE_FLAGS ?= -U flash:w:$(TARGET).hex AVRDUDE_FLAGS ?=
# Output Messages # Output Messages
MSG_AVRDUDE_CMD = ' [AVRDUDE] :' MSG_AVRDUDE_CMD = ' [AVRDUDE] :'
AVRDUDE_FLASH_FLAGS = -U flash:w:$< $(AVRDUDE_FLAGS)
AVRDUDE_EEP_FLAGS = -U eeprom:w:$< $(AVRDUDE_FLAGS)
program: $(TARGET).hex program: $(TARGET).hex
@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" with settings \"$(AVRDUDE_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\" @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_FLAGS) 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)

@ -161,15 +161,15 @@ hex: $(TARGET).hex $(TARGET).eep
lss: $(TARGET).lss lss: $(TARGET).lss
%.o: %.c %.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 $@ $(CROSS)gcc -c $(CC_FLAGS) $(C_FLAGS) -O$(OPTIMIZATION) -std=$(C_STANDARD) $< -o $@
%.o: %.cpp %.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 $@ $(CROSS)gcc -c $(CC_FLAGS) $(CPP_FLAGS) -O$(OPTIMIZATION) -std=$(CPP_STANDARD) -x c++ $< -o $@
%.o: %.S %.o: %.S
@echo $(MSG_COMPILE_CMD) Assembling \"$^\" @echo $(MSG_COMPILE_CMD) Assembling \"$<\"
$(CROSS)gcc -c $(CC_FLAGS) $(ASM_FLAGS) -x assembler-with-cpp $< -o $@ $(CROSS)gcc -c $(CC_FLAGS) $(ASM_FLAGS) -x assembler-with-cpp $< -o $@
.PRECIOUS : $(OBJECT_FILES) .PRECIOUS : $(OBJECT_FILES)
@ -178,15 +178,15 @@ lss: $(TARGET).lss
$(CROSS)gcc $^ $(CC_FLAGS) $(LD_FLAGS) -o $@ $(CROSS)gcc $^ $(CC_FLAGS) $(LD_FLAGS) -o $@
%.hex: %.elf %.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 $< $@ $(CROSS)objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@
%.eep: %.elf %.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 $(CROSS)objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex $< $@ || exit 0
%.lss: %.elf %.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 $< > $@ $(CROSS)objdump -h -S -z $< > $@
clean: clean:

@ -44,9 +44,11 @@ DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES
MSG_DOXYGEN_CMD = ' [DOXYGEN] :' MSG_DOXYGEN_CMD = ' [DOXYGEN] :'
# Determine Doxygen invocation command # 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) 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 endif
doxygen: doxygen:

Loading…
Cancel
Save