1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #5761 from mali/rmdeadcode

boards/atmega_common: remove dead code on link
This commit is contained in:
Martine Lenders 2016-09-12 17:01:15 +02:00 committed by GitHub
commit 8a74475e70
3 changed files with 13 additions and 4 deletions

View File

@ -35,13 +35,13 @@ endif
# define build specific options
export CFLAGS_CPU = -mmcu=atmega2560 $(CFLAGS_FPU)
export CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums
export CFLAGS_LINK = -fno-builtin -fshort-enums
export CFLAGS_DBG = -ggdb -g3
export CFLAGS_OPT ?= -Os
export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
export ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc -e reset_handler
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -e reset_handler
export OFLAGS += -j .text -j .data -O ihex
export FFLAGS += -p m2560 -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -D -U flash:w:bin/$(BOARD)/$(PROJECT)$(APPLICATION).hex

View File

@ -49,12 +49,12 @@ endif
# define build specific options
export CFLAGS_CPU = -mmcu=atmega1281 $(CFLAGS_FPU)
export CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums
export CFLAGS_LINK = -fno-builtin -fshort-enums
export CFLAGS_DBG = -ggdb -g3
export CFLAGS_OPT ?= -Os
export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
export ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc -e reset_handler
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -e reset_handler
export OFLAGS += -j .text -j .data -O ihex
export FFLAGS += -p m1281 -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:bin/$(BOARD)/$(PROJECT)$(APPLICATION).hex

View File

@ -1,6 +1,15 @@
# Target architecture for the build. Use avr if you are unsure.
export TARGET_ARCH ?= avr
# define build specific options
CFLAGS_LINK = -ffunction-sections -fdata-sections
# export compiler flags
export CFLAGS += $(CFLAGS_LINK)
# export linker flags
export LINKFLAGS += -Wl,--gc-sections -static -lgcc
# export the peripheral drivers to be linked into the final binary
export USEMODULE += periph