From a827a8ad5a7b2ffdd83c0eeba82ec7468df321f9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 5 Dec 2018 18:13:17 +0100 Subject: support static analysis of stack usage --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') 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 -- cgit v1.2.3