From d348258f2c27367cc8ff77c9d2bf94313ebf2020 Mon Sep 17 00:00:00 2001 From: Konstantin Kondrashov Date: Thu, 15 Feb 2024 12:02:36 +0200 Subject: [PATCH] fix(test_apps): Fix coredump_uart_bin_crc.test_hw_stack_guard_cpu0 test --- tools/test_apps/system/panic/main/test_panic.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/test_apps/system/panic/main/test_panic.c b/tools/test_apps/system/panic/main/test_panic.c index 24e3cb9c95..adb9b3eff3 100644 --- a/tools/test_apps/system/panic/main/test_panic.c +++ b/tools/test_apps/system/panic/main/test_panic.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -64,10 +64,18 @@ void test_task_wdt_cpu0(void) } __attribute__((optimize("-O0"))) +static void test_hw_stack_guard_cpu(void* arg) +{ + uint32_t buf[256]; + test_hw_stack_guard_cpu(arg); +} + void test_hw_stack_guard_cpu0(void) { - uint32_t buf[128]; - test_hw_stack_guard_cpu0(); + xTaskCreatePinnedToCore(test_hw_stack_guard_cpu, "HWSG0", 512, NULL, 1, NULL, 0); + while (true) { + vTaskDelay(100); + } } #if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY