diff --git a/examples/platform/esp32/shell_extension/heap_trace.cpp b/examples/platform/esp32/shell_extension/heap_trace.cpp index adec9cfff4b1ad..4ed70473ac278c 100644 --- a/examples/platform/esp32/shell_extension/heap_trace.cpp +++ b/examples/platform/esp32/shell_extension/heap_trace.cpp @@ -42,7 +42,9 @@ constexpr size_t kNumHeapTraceRecords = 100; constexpr size_t kNumHeapTasks = 20; constexpr size_t kNumHeapBlocks = 20; +#if CONFIG_HEAP_TRACING_STANDALONE heap_trace_record_t sTraceRecords[kNumHeapTraceRecords]; +#endif Engine sShellHeapSubCommands;