mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 07:23:34 +08:00
LPC11C24: Enabled LTO; binary size 26.6k
This commit is contained in:
@@ -44,13 +44,10 @@ DEPDIR = $(BUILDDIR)/dep
|
|||||||
|
|
||||||
DEF += -DNDEBUG -DCHIP_LPC11CXX -DCORE_M0 -DTHUMB_NO_INTERWORKING -U__STRICT_ANSI__
|
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 \
|
C_CPP_FLAGS = $(FLAGS) -MD -MP -MF $(DEPDIR)/$(@F).d
|
||||||
-fno-common -fno-exceptions -fno-unwind-tables -fno-stack-protector -fomit-frame-pointer
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
C_CPP_FLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
|
|
||||||
|
|
||||||
CFLAGS = $(C_CPP_FLAGS) -std=c99
|
CFLAGS = $(C_CPP_FLAGS) -std=c99
|
||||||
|
|
||||||
|
|||||||
@@ -135,8 +135,9 @@ extern void __stack_end(void);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Vector table for LPC11Cxx
|
* 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) =
|
void (* const VectorTable[64])(void) =
|
||||||
{
|
{
|
||||||
__stack_end, // The initial stack pointer
|
__stack_end, // The initial stack pointer
|
||||||
|
|||||||
Reference in New Issue
Block a user