From 2521421bb494e7835afbb57bbfd937573610fe16 Mon Sep 17 00:00:00 2001 From: t-moe Date: Tue, 2 Jun 2015 16:26:52 +0200 Subject: [PATCH] Improved discovery Makefiles to throw away unsused symbols and make elf smaller. --- discovery/Makefile | 2 +- discovery/libs/Pixy/Makefile | 2 +- discovery/libs/StmCoreNPheriph/Makefile | 2 +- discovery/libs/StmUsbHost/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discovery/Makefile b/discovery/Makefile index d4caf01..838f502 100644 --- a/discovery/Makefile +++ b/discovery/Makefile @@ -41,7 +41,7 @@ INCLUDES:=$(addprefix -I,$(INCLUDES)) CPPFLAGS=-DUSE_USB_OTG_FS -DUSE_HOST_MODE $(INCLUDES) -CFLAGS=$(ARCH_FLAGS) -O0 -g -std=c99 +CFLAGS=$(ARCH_FLAGS) -O0 -g -std=c99 -fdata-sections -ffunction-sections LIBS=pixy usbhost coreperiph stdc++ diff --git a/discovery/libs/Pixy/Makefile b/discovery/libs/Pixy/Makefile index 0115f16..531b681 100644 --- a/discovery/libs/Pixy/Makefile +++ b/discovery/libs/Pixy/Makefile @@ -21,7 +21,7 @@ ARCH_FLAGS=-mthumb -mcpu=cortex-m4 $(FP_FLAGS) #Compiler, Linker Options CPPFLAGS=-I$(INC_DIR) -D__LINUX__=1 -DHOST=1 #-DDEBUG=1 -CFLAGS=$(ARCH_FLAGS) -O0 -g #-ffunction-sections -fdata-sections -g +CFLAGS=$(ARCH_FLAGS) -O0 -g -fdata-sections -ffunction-sections #CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork #CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 diff --git a/discovery/libs/StmCoreNPheriph/Makefile b/discovery/libs/StmCoreNPheriph/Makefile index d3d4a19..8cd4a3a 100644 --- a/discovery/libs/StmCoreNPheriph/Makefile +++ b/discovery/libs/StmCoreNPheriph/Makefile @@ -21,7 +21,7 @@ ARCH_FLAGS=-mthumb -mcpu=cortex-m4 $(FP_FLAGS) #Compiler, Linker Options CPPFLAGS=-I$(INC_DIR) -CFLAGS=$(ARCH_FLAGS) -O0 -g #-ffunction-sections -fdata-sections -g +CFLAGS=$(ARCH_FLAGS) -O0 -g -ffunction-sections -fdata-sections #CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork #CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 diff --git a/discovery/libs/StmUsbHost/Makefile b/discovery/libs/StmUsbHost/Makefile index bb27d6d..c2ac213 100644 --- a/discovery/libs/StmUsbHost/Makefile +++ b/discovery/libs/StmUsbHost/Makefile @@ -27,7 +27,7 @@ ARCH_FLAGS=-mthumb -mcpu=cortex-m4 $(FP_FLAGS) #Compiler, Linker Options CPPFLAGS=-DUSE_USB_OTG_FS -DUSE_HOST_MODE -I$(INC_DIR) -I$(INC_DIR2) -I$(INC_DIR3) -I$(INC_CORE_DIR) -CFLAGS=$(ARCH_FLAGS) -O0 -g #-ffunction-sections -fdata-sections -g +CFLAGS=$(ARCH_FLAGS) -O0 -g -ffunction-sections -fdata-sections #CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork #CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16