feat(cmakev2/size): add idf_create_size_report function

The idf_create_size_report function allows for the creation of size
report targets based on the generated link map file. The size report
targets are created using the TARGET option name: "<target>",
"<target>-files", and "<target>-components". These size report targets
are added to the idf_default_project with the TARGET set to "size",
resulting in the creation of "size", "size-files", and "size-components"
targets for the default project.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2025-11-20 10:22:51 +01:00
parent 3318bd4c1d
commit 91add83a38
4 changed files with 99 additions and 0 deletions
+10
View File
@@ -235,6 +235,11 @@ function(test_executable)
idf_create_confserver(fatfs_example
TARGET confserver-fatfs)
if(TARGET fatfs_example_mapfile)
idf_create_size_report(fatfs_example_mapfile
TARGET fatfs-size)
endif()
idf_build_executable(hello_world_example
COMPONENTS hello_world_example
@@ -252,6 +257,11 @@ function(test_executable)
OUTPUT_FILE project_description_hello_world.json)
idf_create_confserver(hello_world_example
TARGET confserver-hello_world)
if(TARGET hello_world_example_mapfile)
idf_create_size_report(hello_world_example_mapfile
TARGET hello-size)
endif()
endfunction()
# Run tests