mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-29 21:34:07 +08:00
LPC11C24: Enabled LTO; binary size 26.6k
This commit is contained in:
parent
65c6fdf396
commit
698a3ad325
@ -44,13 +44,10 @@ DEPDIR = $(BUILDDIR)/dep
|
||||
|
||||
DEF += -DNDEBUG -DCHIP_LPC11CXX -DCORE_M0 -DTHUMB_NO_INTERWORKING -U__STRICT_ANSI__
|
||||
|
||||
FLAGS = -mthumb -mcpu=cortex-m0 -mno-thumb-interwork
|
||||
FLAGS = -mthumb -mcpu=cortex-m0 -mno-thumb-interwork -flto -Os -g3 -Wall -Wextra -Werror -ffunction-sections \
|
||||
-fdata-sections -fno-common -fno-exceptions -fno-unwind-tables -fno-stack-protector -fomit-frame-pointer
|
||||
|
||||
C_CPP_FLAGS = $(FLAGS) -Os -g3 -Wall -Wextra -Werror -ffunction-sections -fdata-sections \
|
||||
-fno-common -fno-exceptions -fno-unwind-tables -fno-stack-protector -fomit-frame-pointer
|
||||
|
||||
# Dependencies
|
||||
C_CPP_FLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
|
||||
C_CPP_FLAGS = $(FLAGS) -MD -MP -MF $(DEPDIR)/$(@F).d
|
||||
|
||||
CFLAGS = $(C_CPP_FLAGS) -std=c99
|
||||
|
||||
|
||||
@ -135,8 +135,9 @@ extern void __stack_end(void);
|
||||
|
||||
/**
|
||||
* Vector table for LPC11Cxx
|
||||
* Must be explicitly defined 'used', otherwise LTO optimizer will discard it.
|
||||
*/
|
||||
__attribute__ ((section("vectors")))
|
||||
__attribute__ ((used, section("vectors")))
|
||||
void (* const VectorTable[64])(void) =
|
||||
{
|
||||
__stack_end, // The initial stack pointer
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user