This commit is contained in:
Edward Emelianov
2023-01-11 21:19:18 +03:00
parent a5e420ac51
commit e98aa11f72
29 changed files with 54 additions and 46 deletions

View File

@@ -54,12 +54,11 @@ CFLAGS += -O2 -MD -D__thumb2__=1
CFLAGS += -Wall -Werror -Wextra -Wshadow -Wimplicit-function-declaration
CFLAGS += -Wredundant-decls $(INCLUDE)
# -Wmissing-prototypes -Wstrict-prototypes
CFLAGS += -fno-common -ffunction-sections -fdata-sections
CFLAGS += -fno-common -ffunction-sections -fdata-sections -flto
###############################################################################
# Linker flags
LDFLAGS += --static -nostartfiles
#--specs=nano.specs
LDFLAGS += --static -nostartfiles --specs=nano.specs -flto
LDFLAGS += -L$(LIB_DIR)
LDFLAGS += -T$(LDSCRIPT)
LDFLAGS += -Wl,-Map=$(OBJDIR)/$(BINARY).map
@@ -127,7 +126,7 @@ clean:
@rmdir $(OBJDIR) 2>/dev/null || true
size: $(ELF)
$(SIZE) $(ELF)
$(SIZE) -Ax $(ELF)
flash: $(BIN)
@echo " FLASH $(BIN)"