From 9267d9dd61f8b0d70ff005bed1b71cd308f44c13 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 23 Sep 2021 15:37:02 +0200 Subject: [PATCH] build system: add VERBOSE_ASSERT flag Add a compile-time convenience variable to enable verbose asserts. --- Makefile.include | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile.include b/Makefile.include index 59fa480fe8..dbbb53a84e 100644 --- a/Makefile.include +++ b/Makefile.include @@ -284,6 +284,16 @@ else Q= endif +# Set this to 1 to enable pretty-printing the assert location in addition +# to the address of the failing assert. +# This saves you to resolve the address manually with addr2line at the cost +# of greater ROM consumption. +VERBOSE_ASSERT ?= 0 +ifeq ($(VERBOSE_ASSERT),1) + CFLAGS += -DDEBUG_ASSERT_VERBOSE + DEVELHELP := 1 +endif + # Set this to 1 to enable code in RIOT that does safety checking # which is not needed in a production environment but helps in the # development process: