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