From bfe3511493ef8fb4753d2d1eddb47c983153fb16 Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Thu, 19 Sep 2024 13:43:50 +0700 Subject: [PATCH] fix(panic): fix HWSG testcase to avoid freertos watchpoint trap --- tools/test_apps/system/panic/main/test_panic.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/test_apps/system/panic/main/test_panic.c b/tools/test_apps/system/panic/main/test_panic.c index eafc9daddf..7733955982 100644 --- a/tools/test_apps/system/panic/main/test_panic.c +++ b/tools/test_apps/system/panic/main/test_panic.c @@ -68,17 +68,16 @@ void test_task_wdt_cpu0(void) } #if CONFIG_ESP_SYSTEM_HW_STACK_GUARD - +#define HWSG_TASK_SIZE 1024 __attribute__((optimize("-O0"))) static void test_hw_stack_guard_cpu(void* arg) { - uint32_t buf[256]; - test_hw_stack_guard_cpu(arg); + uint32_t buf[HWSG_TASK_SIZE + 1]; /* go out of the stack to avoid FREERTOS_WATCHPOINT_END_OF_STACK trap */ } void test_hw_stack_guard_cpu0(void) { - xTaskCreatePinnedToCore(test_hw_stack_guard_cpu, "HWSG0", 512, NULL, 1, NULL, 0); + xTaskCreatePinnedToCore(test_hw_stack_guard_cpu, "HWSG0", HWSG_TASK_SIZE, NULL, 1, NULL, 0); while (true) { vTaskDelay(100); } @@ -87,7 +86,7 @@ void test_hw_stack_guard_cpu0(void) #if !CONFIG_FREERTOS_UNICORE void test_hw_stack_guard_cpu1(void) { - xTaskCreatePinnedToCore(test_hw_stack_guard_cpu, "HWSG1", 512, NULL, 1, NULL, 1); + xTaskCreatePinnedToCore(test_hw_stack_guard_cpu, "HWSG1", HWSG_TASK_SIZE, NULL, 1, NULL, 1); while (true) { vTaskDelay(100); }