mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-02-28 03:44:30 +03:00
-flto
This commit is contained in:
@@ -60,7 +60,7 @@ LIB_DIR := $(INC_DIR)/ld
|
||||
CFLAGS += -g -gdwarf-2 # debuggin symbols in listing
|
||||
CFLAGS += -O2 -D__thumb2__=1 -MD
|
||||
CFLAGS += -Wall -Werror -Wextra -Wshadow
|
||||
CFLAGS += -fshort-enums -ffunction-sections -fdata-sections
|
||||
CFLAGS += -fshort-enums -ffunction-sections -fdata-sections -flto
|
||||
#CFLAGS += -fno-common -ffunction-sections -fdata-sections -fno-stack-protector
|
||||
CFLAGS += $(ARCH_FLAGS)
|
||||
|
||||
@@ -68,7 +68,7 @@ CFLAGS += $(ARCH_FLAGS)
|
||||
# Linker flags
|
||||
#LDFLAGS += -nostartfiles --static -nostdlib -specs=nosys.specs -specs=nano.specs
|
||||
LDFLAGS += $(ARCH_FLAGS)
|
||||
LDFLAGS += -specs=nano.specs -specs=nosys.specs
|
||||
LDFLAGS += -specs=nano.specs -flto
|
||||
LDFLAGS += -L$(LIB_DIR)
|
||||
#-L$(TOOLCHLIB)
|
||||
LDFLAGS += -T$(LDSCRIPT)
|
||||
|
||||
Binary file not shown.
@@ -798,7 +798,7 @@ typedef struct {
|
||||
|
||||
extern unsigned _stack;
|
||||
|
||||
vector_table_t vector_table __attribute__ ((section(".vector_table"))) = {
|
||||
vector_table_t vector_table __attribute__ ((used, section(".vector_table"))) = {
|
||||
.initial_sp_value = &_stack,
|
||||
.reset = reset_handler,
|
||||
.nmi = nmi_handler,
|
||||
@@ -831,7 +831,7 @@ void WEAK __attribute__ ((naked)) __attribute__ ((noreturn)) reset_handler(void)
|
||||
char *src = &_ldata;
|
||||
|
||||
// enable 8-byte stack alignment to comply with AAPCS
|
||||
SCB->CCR |= 0x00000200;
|
||||
// SCB->CCR |= 0x00000200;
|
||||
|
||||
/* FPU settings ------------------------------------------------------------*/
|
||||
#if (__FPU_PRESENT == 1)
|
||||
|
||||
Reference in New Issue
Block a user