Skip to content

Commit

Permalink
[Heap Trace Standalone] increase Kconfig max stack size
Browse files Browse the repository at this point in the history
  • Loading branch information
chipweinberger authored and ESP-Marius committed May 31, 2023
1 parent 3c8a782 commit 23cba5f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/heap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 23 additions & 1 deletion components/heap/include/heap_trace.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 23cba5f

Please sign in to comment.