summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-12-05 18:13:17 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-12-05 18:13:17 +0100
commita827a8ad5a7b2ffdd83c0eeba82ec7468df321f9 (patch)
tree81c978083b385b9b93b654ffc18b98a15e76de6b /Makefile
parentd0157ffa16adaf59d56148e39f9397b348e72f8e (diff)
support static analysis of stack usage
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5333e49..7fe3368 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,10 @@ ifneq (${verbose}, )
QUIET =
endif
+ifneq (${stack_usage}, )
+ COMMON_FLAGS += -fstack-usage
+endif
+
include src/app/${app}/Makefile.inc
ifneq ($(findstring lm75,${drivers}), )
@@ -123,6 +127,11 @@ endif
include src/arch/${arch}/Makefile.inc
+stack: default
+ @test -n "${OBJDUMP}"
+ @test -n "${ARCH_CALL_COST}"
+ @./avstack.pl ${OBJDUMP} ${ARCH_CALL_COST} ${OBJECTS}
+
clean: arch_clean
rm -f build/system.elf
@@ -144,4 +153,4 @@ help: arch_help
info: arch_info
@echo "Selected Drivers: ${drivers} / ${arch_drivers}"
-.PHONY: clean help info
+.PHONY: clean default stack help info