|
|
|
@ -97,8 +97,8 @@ OBJDIR = . |
|
|
|
|
LUFA_PATH = ### INSERT PATH TO LUFA LIBRARY RELATIVE TO PROJECT DIRECTORY HERE ### |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# LUFA library compile-time options and predefined tokens |
|
|
|
|
LUFA_OPTS = ### INSERT LUFA COMPILE TIME TOKES HERE ### |
|
|
|
|
# LUFA library compile-time options and predefined tokens (add '-D' before each token) |
|
|
|
|
LUFA_OPTS = ### INSERT LUFA COMPILE TIME TOKES HERE ### |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Create the LUFA source path variables by including the LUFA root makefile |
|
|
|
@ -123,13 +123,13 @@ CPPSRC = |
|
|
|
|
# Even though the DOS/Win* filesystem matches both .s and .S the same, |
|
|
|
|
# it will preserve the spelling of the filenames, and gcc itself does |
|
|
|
|
# care about how the name is spelled on its command-line. |
|
|
|
|
ASRC = Exception.S |
|
|
|
|
ASRC = |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Optimization level, can be [0, 1, 2, 3, s]. |
|
|
|
|
# 0 = turn off optimization. s = optimize for size. |
|
|
|
|
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) |
|
|
|
|
OPT = 0 |
|
|
|
|
OPT = s |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Debugging level. |
|
|
|
@ -172,8 +172,6 @@ CPPDEFS += -DF_USB=$(F_USB)UL |
|
|
|
|
CPPDEFS += -DBOARD=BOARD_$(BOARD) |
|
|
|
|
CPPDEFS += -DARCH=ARCH_$(ARCH) |
|
|
|
|
CPPDEFS += $(LUFA_OPTS) |
|
|
|
|
#CPPDEFS += -D__STDC_LIMIT_MACROS |
|
|
|
|
#CPPDEFS += -D__STDC_CONSTANT_MACROS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -191,9 +189,9 @@ CFLAGS += -funsigned-char |
|
|
|
|
CFLAGS += -funsigned-bitfields |
|
|
|
|
CFLAGS += -ffunction-sections |
|
|
|
|
CFLAGS += -fno-strict-aliasing |
|
|
|
|
CFLAGS += -masm-addr-pseudos |
|
|
|
|
CFLAGS += -Wall |
|
|
|
|
CFLAGS += -Wstrict-prototypes |
|
|
|
|
CFLAGS += -masm-addr-pseudos |
|
|
|
|
CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst) |
|
|
|
|
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) |
|
|
|
|
CFLAGS += $(CSTANDARD) |
|
|
|
@ -231,7 +229,7 @@ CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) |
|
|
|
|
# files -- see avr-libc docs [FIXME: not yet described there] |
|
|
|
|
# -listing-cont-lines: Sets the maximum number of continuation lines of hex |
|
|
|
|
# dump that will be displayed for a given single line of source input. |
|
|
|
|
ASFLAGS = -g3 $(ADEFS) |
|
|
|
|
ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#---------------- Linker Options ---------------- |
|
|
|
@ -239,9 +237,11 @@ ASFLAGS = -g3 $(ADEFS) |
|
|
|
|
# -Map: create map file |
|
|
|
|
# --cref: add cross reference to map file |
|
|
|
|
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref |
|
|
|
|
LDFLAGS += -Wl,--gc-sections --rodata-writable |
|
|
|
|
LDFLAGS += -Wl,--relax |
|
|
|
|
LDFLAGS += -Wl,--gc-sections |
|
|
|
|
LDFLAGS += -Wl,--rodata-writable |
|
|
|
|
LDFLAGS += -Wl,--direct-data |
|
|
|
|
#LDFLAGS += -T avr32elf_uc3b0256.x |
|
|
|
|
#LDFLAGS += -T linker_script.x |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#============================================================================ |
|
|
|
@ -377,7 +377,7 @@ dfu: $(TARGET).hex |
|
|
|
|
%.lss: %.elf |
|
|
|
|
@echo |
|
|
|
|
@echo $(MSG_EXTENDED_LISTING) $@ |
|
|
|
|
$(OBJDUMP) -h -S $< > $@ |
|
|
|
|
$(OBJDUMP) -h -S -z $< > $@ |
|
|
|
|
|
|
|
|
|
# Create a symbol table from ELF output file. |
|
|
|
|
%.sym: %.elf |
|
|
|
|