nrf: Enable Link-time optimizations
This commit is contained in:
parent
4e083819f3
commit
4838b398af
|
@ -74,14 +74,13 @@ CFLAGS += $(CFLAGS_MCU_$(MCU_SERIES))
|
|||
CFLAGS += $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(COPT) $(NRF_DEFINES) $(CFLAGS_MOD)
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CFLAGS += -fstack-usage
|
||||
CFLAGS += -fdata-sections -ffunction-sections
|
||||
CFLAGS += -Iboards/$(BOARD)
|
||||
CFLAGS += -DNRF5_HAL_H='<$(MCU_VARIANT)_hal.h>'
|
||||
CFLAGS += -flto
|
||||
|
||||
LDFLAGS = $(CFLAGS)
|
||||
LDFLAGS += -Xlinker -Map=$(@:.elf=.map)
|
||||
LDFLAGS += -mthumb -mabi=aapcs -T $(LD_FILE) -L boards/
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
#Debugging/Optimization
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
|
|
@ -103,7 +103,7 @@ void SWI3_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler"
|
|||
void SWI4_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void SWI5_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
|
||||
const func __Vectors[] __attribute__ ((section(".isr_vector"))) = {
|
||||
const func __Vectors[] __attribute__ ((section(".isr_vector"),used)) = {
|
||||
(func)&_estack,
|
||||
Reset_Handler,
|
||||
NMI_Handler,
|
||||
|
|
|
@ -107,7 +107,7 @@ void SPIM2_SPIS2_SPI2_IRQHandler (void) __attribute__ ((weak, alias("Default_Han
|
|||
void RTC2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void I2S_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
|
||||
const func __Vectors[] __attribute__ ((section(".isr_vector"))) = {
|
||||
const func __Vectors[] __attribute__ ((section(".isr_vector"),used)) = {
|
||||
(func)&_estack,
|
||||
Reset_Handler,
|
||||
NMI_Handler,
|
||||
|
|
|
@ -114,7 +114,7 @@ void CRYPTOCELL_IRQHandler (void) __attribute__ ((weak, alias("Default_Han
|
|||
void SPIM3_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void PWM3_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
|
||||
const func __Vectors[] __attribute__ ((section(".isr_vector"))) = {
|
||||
const func __Vectors[] __attribute__ ((section(".isr_vector"),used)) = {
|
||||
(func)&_estack,
|
||||
Reset_Handler,
|
||||
NMI_Handler,
|
||||
|
|
Loading…
Reference in New Issue