File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ NRF_DEFINES += -DCONFIG_GPIO_AS_PINRESET
6565
6666CFLAGS_CORTEX_M = -mthumb -mabi=aapcs -fsingle-precision-constant -Wdouble-promotion
6767
68- CFLAGS_MCU_m4 = $(CFLAGS_CORTEX_M ) -mtune=cortex-m4 -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections
68+ CFLAGS_MCU_m4 = $(CFLAGS_CORTEX_M ) -mtune=cortex-m4 -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
6969
7070CFLAGS_MCU_m0 = $(CFLAGS_CORTEX_M ) --short-enums -mtune=cortex-m0 -mcpu=cortex-m0 -mfloat-abi=soft -fno-builtin
7171
@@ -74,12 +74,14 @@ CFLAGS += $(CFLAGS_MCU_$(MCU_SERIES))
7474CFLAGS += $(INC ) -Wall -Werror -ansi -std=gnu99 -nostdlib $(COPT ) $(NRF_DEFINES ) $(CFLAGS_MOD )
7575CFLAGS += -fno-strict-aliasing
7676CFLAGS += -fstack-usage
77+ CFLAGS += -fdata-sections -ffunction-sections
7778CFLAGS += -Iboards/$(BOARD )
7879CFLAGS += -DNRF5_HAL_H='<$(MCU_VARIANT ) _hal.h>'
7980
8081LDFLAGS = $(CFLAGS )
8182LDFLAGS += -Xlinker -Map=$(@:.elf=.map )
8283LDFLAGS += -mthumb -mabi=aapcs -T $(LD_FILE ) -L boards/
84+ LDFLAGS += -Wl,--gc-sections
8385
8486# Debugging/Optimization
8587ifeq ($(DEBUG ) , 1)
You can’t perform that action at this time.
0 commit comments