From c3ed3684a727bca43c5e11e401ca1c4396ffb821 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Sun, 30 Aug 2015 21:42:09 +0200 Subject: [PATCH] Platform-dependent size --- Makefile | 2 +- Makefile.simulator | 1 + Makefile.stm32f429 | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8e39c4ab5..65ada7f8b 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ info: size: boot.elf @echo "========= BUILD OUTPUT ========" @echo "File: $<" - @arm-none-eabi-size $< | tail -n 1 | awk '{print "Code: " $$1 " bytes";print "Data: " $$2 " bytes"; print "Total: " int(($$1+$$2)/1024) " kB (" $$1 + $$2 " bytes)";}' + @$(SIZE) $< | tail -n 1 | awk '{print "Code: " $$1 " bytes";print "Data: " $$2 " bytes"; print "Total: " int(($$1+$$2)/1024) " kB (" $$1 + $$2 " bytes)";}' @echo "===============================" else info: diff --git a/Makefile.simulator b/Makefile.simulator index 47f4f7c85..d46886379 100644 --- a/Makefile.simulator +++ b/Makefile.simulator @@ -1,6 +1,7 @@ CC=clang CXX=clang++ LD=ld +SIZE=size #GDB=gdb #OBJCOPY=$(TOOLCHAIN)-objcopy diff --git a/Makefile.stm32f429 b/Makefile.stm32f429 index 0b28786c2..95ab75327 100644 --- a/Makefile.stm32f429 +++ b/Makefile.stm32f429 @@ -12,6 +12,7 @@ endif LD=$(TOOLCHAIN)-ld.bfd GDB=$(TOOLCHAIN)-gdb OBJCOPY=$(TOOLCHAIN)-objcopy +SIZE=$(TOOLCHAIN)-size # Flags - Arch ifeq ($(COMPILER),llvm)