scripts: size_report: Add a depth parameter to CMakeLists.txt

The parameter can be used to limit the ram and rom reports to a
certain depth.  The resulting graphs with depths of e.g. 3 or 4 are
visually easier to grasp.

Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
This commit is contained in:
Detlev Zundel 2021-02-25 09:22:26 +01:00 committed by Anas Nashif
parent e5f33bd740
commit f1f5f607b2
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,7 @@
set(flag_for_ram_report ram)
set(flag_for_rom_report rom)
set(report_depth 99)
foreach(report ram_report rom_report)
add_custom_target(
@ -12,6 +13,7 @@ foreach(report ram_report rom_report)
-z ${ZEPHYR_BASE}
-o ${CMAKE_BINARY_DIR}
--json ${CMAKE_BINARY_DIR}/${flag_for_${report}}.json
-d ${report_depth}
${flag_for_${report}}
DEPENDS ${logical_target_for_zephyr_elf}
$<TARGET_PROPERTY:zephyr_property_target,${report}_DEPENDENCIES>