From 23cba5fe002ec8205585fa58122dce81ec51031d Mon Sep 17 00:00:00 2001 From: Chip Weinberger Date: Thu, 25 May 2023 20:29:13 -0700 Subject: [PATCH] [Heap Trace Standalone] increase Kconfig max stack size --- components/heap/Kconfig | 2 +- components/heap/include/heap_trace.inc | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/components/heap/Kconfig b/components/heap/Kconfig index ce47cbfa75d4..0e9e2486c382 100644 --- a/components/heap/Kconfig +++ b/components/heap/Kconfig @@ -47,7 +47,7 @@ menu "Heap memory debugging" int "Heap tracing stack depth" range 0 0 if IDF_TARGET_ARCH_RISCV # Disabled for RISC-V due to `__builtin_return_address` limitation default 0 if IDF_TARGET_ARCH_RISCV - range 0 10 + range 0 32 default 2 depends on HEAP_TRACING help diff --git a/components/heap/include/heap_trace.inc b/components/heap/include/heap_trace.inc index fd0d56520fee..7d20467098ef 100644 --- a/components/heap/include/heap_trace.inc +++ b/components/heap/include/heap_trace.inc @@ -70,9 +70,31 @@ static HEAP_IRAM_ATTR __attribute__((noinline)) void get_call_stack(void **calle TEST_STACK(7); TEST_STACK(8); TEST_STACK(9); + TEST_STACK(10); + TEST_STACK(11); + TEST_STACK(12); + TEST_STACK(13); + TEST_STACK(14); + TEST_STACK(15); + TEST_STACK(16); + TEST_STACK(17); + TEST_STACK(18); + TEST_STACK(19); + TEST_STACK(20); + TEST_STACK(21); + TEST_STACK(22); + TEST_STACK(23); + TEST_STACK(24); + TEST_STACK(25); + TEST_STACK(26); + TEST_STACK(27); + TEST_STACK(28); + TEST_STACK(29); + TEST_STACK(30); + TEST_STACK(31); } -ESP_STATIC_ASSERT(STACK_DEPTH >= 0 && STACK_DEPTH <= 10, "CONFIG_HEAP_TRACING_STACK_DEPTH must be in range 0-10"); +ESP_STATIC_ASSERT(STACK_DEPTH >= 0 && STACK_DEPTH <= 32, "CONFIG_HEAP_TRACING_STACK_DEPTH must be in range 0-10"); typedef enum {