mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-02-28 03:44:30 +03:00
-flto
This commit is contained in:
Binary file not shown.
@@ -63,12 +63,12 @@ LIB_DIR := $(INC_DIR)/ld
|
||||
# C flags
|
||||
CFLAGS += -O2 -g -D__thumb2__=1 -MD
|
||||
CFLAGS += -Wall -Werror -Wextra -Wshadow
|
||||
CFLAGS += -fno-common -ffunction-sections -fdata-sections -fno-stack-protector
|
||||
CFLAGS += -fno-common -ffunction-sections -fdata-sections -fno-stack-protector
|
||||
CFLAGS += $(ARCH_FLAGS)
|
||||
|
||||
###############################################################################
|
||||
# Linker flags
|
||||
LDFLAGS += -nostartfiles --static -nostdlibs --gc-sections --print-memory-usage
|
||||
LDFLAGS += -nostartfiles --static -nostdlibs --gc-sections --print-memory-usage
|
||||
LDFLAGS += -L$(LIB_DIR) -L$(TOOLCHLIB)
|
||||
LDFLAGS += -T$(LDSCRIPT)
|
||||
|
||||
|
||||
@@ -63,12 +63,12 @@ LIB_DIR := $(INC_DIR)/ld
|
||||
# C flags
|
||||
CFLAGS += -O2 -g -D__thumb2__=1 -MD -g -gdwarf-2
|
||||
CFLAGS += -Wall -Werror -Wextra -Wshadow
|
||||
CFLAGS += -fno-common -ffunction-sections -fdata-sections -fno-stack-protector -fshort-enums
|
||||
CFLAGS += -fno-common -ffunction-sections -fdata-sections -fno-stack-protector -fshort-enums
|
||||
CFLAGS += $(ARCH_FLAGS)
|
||||
|
||||
###############################################################################
|
||||
# Linker flags
|
||||
LDFLAGS += -nostartfiles --static -nostdlibs --gc-sections --print-memory-usage
|
||||
LDFLAGS += -nostartfiles --static --gc-sections --print-memory-usage -specs=nano.specs
|
||||
LDFLAGS += -L$(LIB_DIR) -L$(TOOLCHLIB)
|
||||
LDFLAGS += -T$(LDSCRIPT)
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
#define BUILD_NUMBER "71"
|
||||
#define BUILD_DATE "2022-05-28"
|
||||
#define BUILD_NUMBER "72"
|
||||
#define BUILD_DATE "2023-01-11"
|
||||
|
||||
@@ -795,7 +795,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,
|
||||
@@ -828,7 +828,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;
|
||||
|
||||
// copy initialized variables data
|
||||
while ( dst < &_edata ) { *dst++ = *src++; }
|
||||
|
||||
Reference in New Issue
Block a user