summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-02-12 15:48:02 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-02-12 15:48:02 +0100
commitfaa10a530fc89815926375ce4cbe13b0330daa76 (patch)
tree08aa0914772f882c86df53c25cf4f2c23479b064 /src/arch
parent0181e7e34983cdc384790ce995874db40380a24e (diff)
msp430 makefile: show ROM/RAM usage
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/msp430fr5969lp/Makefile.inc2
-rw-r--r--src/arch/msp430fr5994lp/Makefile.inc2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc
index 912048a..eb275da 100644
--- a/src/arch/msp430fr5969lp/Makefile.inc
+++ b/src/arch/msp430fr5969lp/Makefile.inc
@@ -20,6 +20,7 @@ CC = /opt/msp430/ti/gcc/bin/msp430-elf-gcc
CXX = /opt/msp430/ti/gcc/bin/msp430-elf-g++
OBJCOPY = /opt/msp430/ti/gcc/bin/msp430-elf-objcopy
OBJDUMP = /opt/msp430/ti/gcc/bin/msp430-elf-objdump
+SIZE = /opt/msp430/ti/gcc/bin/msp430-elf-size
ARCH_SHORTNAME = msp430
@@ -86,6 +87,7 @@ build/system.elf: ${OBJECTS}
-Wl,--library-path=/opt/msp430/ti/gcc/include/ \
-Wl,--gc-sections \
-o $@ ${OBJECTS}
+ ${QUIET}${SIZE} build/system.elf | tail -n1 | awk '{ print " ROM: " int(($$1+$$2)*100/49152) "% RAM: " int(($$2+$$3)*100/2048) "%" }'
build/system.hex: build/system.elf
${QUIET}${OBJCOPY} -O ihex ${@:.hex=.elf} $@
diff --git a/src/arch/msp430fr5994lp/Makefile.inc b/src/arch/msp430fr5994lp/Makefile.inc
index 1fe6db4..c442f02 100644
--- a/src/arch/msp430fr5994lp/Makefile.inc
+++ b/src/arch/msp430fr5994lp/Makefile.inc
@@ -24,6 +24,7 @@ CC = /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/bin/msp430-elf-gcc
CXX = /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/bin/msp430-elf-g++
OBJCOPY = /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/bin/msp430-elf-objcopy
OBJDUMP = /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/bin/msp430-elf-objdump
+SIZE = /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/bin/msp430-elf-size
ARCH_SHORTNAME = msp430
@@ -90,6 +91,7 @@ build/system.elf: ${OBJECTS}
-Wl,--library-path=/opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/include/ \
-Wl,--gc-sections \
-o $@ ${OBJECTS}
+ ${QUIET}${SIZE} build/system.elf | tail -n1 | awk '{ print " ROM: " int(($$1+$$2)*100/49152) "% RAM: " int(($$2+$$3)*100/4096) "%" }'
build/system.hex: build/system.elf
${QUIET}${OBJCOPY} -O ihex ${@:.hex=.elf} $@