summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2022-07-28 13:28:03 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-28 21:41:43 +0000
commit0bf9503e2848d530758c08cbd8aa5cbead88c9b7 (patch)
tree1d5d2c333da800ed0bca5aaf1bf3b9965b5d20ef
parentcc79e89a501628924e021ca83ee9b0bfd081623c (diff)
downloadchrome-ec-0bf9503e2848d530758c08cbd8aa5cbead88c9b7.tar.gz
Zephyr: Add option for brief panic output
Add an option in for brief panic output. This allows boards to reduce flash usage when they're running tight on space. BRANCH=None BUG=None TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia31b495da0e06dcdbef725ff6383d7318cced639 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3792321 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/Kconfig.panic7
-rw-r--r--zephyr/shim/include/config_chip.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/zephyr/Kconfig.panic b/zephyr/Kconfig.panic
index 322aaee25d..f6e16f5002 100644
--- a/zephyr/Kconfig.panic
+++ b/zephyr/Kconfig.panic
@@ -40,4 +40,11 @@ config PLATFORM_EC_STACKOVERFLOW
This can be used to check that stack-overflow detection is working
as expected.
+config PLATFORM_EC_DEBUG_ASSERT_BRIEF
+ bool "Enable brief panic messages"
+ default n
+ help
+ On assertion failure, prints only the file name and the line number.
+ Boards typically define this option in order to reduce image size.
+
endif # PLATFORM_EC_PANIC
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 7f5cc10388..3d5c033b63 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -2033,6 +2033,11 @@ extern struct jump_data mock_jump_data;
#define CONFIG_SOFTWARE_PANIC
#endif
+#undef CONFIG_DEBUG_ASSSERT_BRIEF
+#ifdef CONFIG_PLATFORM_EC_DEBUG_ASSERT_BRIEF
+#define CONFIG_DEBUG_ASSSERT_BRIEF
+#endif
+
#undef CONFIG_PANIC_CONSOLE_OUTPUT
#ifdef CONFIG_PLATFORM_EC_PANIC_CONSOLE_OUTPUT
#define CONFIG_PANIC_CONSOLE_OUTPUT