From 3ac3a78d7dab1ba7a277795fd27a75ae729fedec Mon Sep 17 00:00:00 2001 From: Deomid Ryabkov Date: Tue, 16 May 2017 14:29:54 +0300 Subject: [PATCH] Print the name of the task that hit the stack watchpoint This may be enough to troubleshoot (increase stack size). Merges https://github.com/espressif/esp-idf/pull/607 --- components/esp32/panic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/esp32/panic.c b/components/esp32/panic.c index 313a4bf28..ff7eae1b2 100644 --- a/components/esp32/panic.c +++ b/components/esp32/panic.c @@ -212,7 +212,10 @@ void panicHandler(XtExcFrame *frame) //debugcause if the cause is watchdog 1 and clearing it if it's watchdog 0. if (debugRsn&(1<<8)) { #if CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK - panicPutStr("Stack canary watchpoint triggered "); + const char *name = pcTaskGetTaskName(xTaskGetCurrentTaskHandleForCPU(core_id)); + panicPutStr("Stack canary watchpoint triggered ("); + panicPutStr(name); + panicPutStr(") "); #else panicPutStr("Watchpoint 1 triggered "); #endif