From 266acb48c8d74efd56f159950eb0b7ece12b5116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sat, 28 Jan 2017 15:07:14 +0100 Subject: [PATCH] edited makefile to strip all unneeded functions from binary --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d8e3e72..cc447e0 100644 --- a/Makefile +++ b/Makefile @@ -26,11 +26,11 @@ INCLUDEPATH += -IFATFS -IFATFS/shimatta_sdio_driver CC=arm-none-eabi-gcc OBJCOPY=arm-none-eabi-objcopy OBJDUMP=arm-none-eabi-objdump - +SIZE=arm-none-eabi-size LFLAGS = -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork LFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 --disable-newlib-supplied-syscalls -nostartfiles -LFLAGS += -Tstm32f407vgt6_flash.ld -Wl,-Map=$(mapfile).map +LFLAGS += -Tstm32f407vgt6_flash.ld -Wl,-Map=$(mapfile).map -Wl,--gc-sections CFLAGS = -c -fmessage-length=0 -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles @@ -54,6 +54,7 @@ default: $(target).elf #Linking $(target).elf: $(OBJ) $(ASOBJ) $(CC) $(LFLAGS) $(LIBRARYPATH) -o $@ $^ $(LIBRARIES) + $(SIZE) $@ #Compiling %.c.o: %.c