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 <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata 2024-11-08 15:44:19 +01:00
parent f15c1b4c4f
commit 798d35b2e1

View File

@ -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}