From 67039c590d51648dd597387c7f088cc6b511275f Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Fri, 8 Nov 2024 15:44:19 +0100 Subject: [PATCH] feat(tools): unify sections in idf.py size reports for NG version By default, esp-idf-size.ng displays all sections individually. This can be confusing, especially if CONFIG_SOC_MEM_NON_CONTIGUOUS_SRAM is enabled, resulting in sections like .dram0.data and .dram1.data being abbreviated as two .data sections in the size report. To avoid confusion for idf.py and cmake users, pass the --unify option to the underlying esp_idf_size.ng by default. Signed-off-by: Frantisek Hrbata --- tools/cmake/run_size_tool.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/cmake/run_size_tool.cmake b/tools/cmake/run_size_tool.cmake index 1e237d5bdb..76164d5e24 100644 --- a/tools/cmake/run_size_tool.cmake +++ b/tools/cmake/run_size_tool.cmake @@ -36,6 +36,10 @@ if(DEFINED ENV{SIZE_DIFF_FILE}) list(APPEND IDF_SIZE_CMD "--diff=$ENV{SIZE_DIFF_FILE}") endif() +if(DEFINED ENV{ESP_IDF_SIZE_NG}) + list(APPEND IDF_SIZE_CMD "--unify") +endif() + list(APPEND IDF_SIZE_CMD ${MAP_FILE}) execute_process(COMMAND ${IDF_SIZE_CMD}