@@ -11,19 +11,29 @@ elseif(DEFINED WEST_TOPDIR)
1111 set (workspace_arg "--workspace=${WEST_TOPDIR} " )
1212endif ()
1313
14- foreach (report ram_report rom_report )
14+ foreach (report ram rom )
1515 add_custom_target (
16- ${report}
16+ ${report} _report
1717 ${PYTHON_EXECUTABLE}
1818 ${ZEPHYR_BASE} /scripts/footprint/size_report
1919 -k ${ZEPHYR_BINARY_DIR} /${KERNEL_ELF_NAME}
2020 -z ${ZEPHYR_BASE}
2121 -o ${CMAKE_BINARY_DIR}
2222 ${workspace_arg}
2323 -d ${report_depth}
24- ${flag_for_${report} }
24+ --json ${report} .json
25+ ${flag_for_${report} _report}
2526 DEPENDS ${logical_target_for_zephyr_elf}
26- $<TARGET_PROPERTY:zephyr_property_target,${report} _DEPENDENCIES>
27+ $<TARGET_PROPERTY:zephyr_property_target,${report} _report_DEPENDENCIES>
28+ USES_TERMINAL
29+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
30+ )
31+ add_custom_target (
32+ ${report} _plot
33+ ${PYTHON_EXECUTABLE}
34+ ${ZEPHYR_BASE} /scripts/footprint/plot.py
35+ ${report} .json
36+ DEPENDS ${report} _report
2737 USES_TERMINAL
2838 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
2939 )
@@ -51,6 +61,15 @@ if(CONFIG_BUILD_WITH_TFM)
5161 USES_TERMINAL
5262 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
5363 )
64+ add_custom_target (
65+ tfm_${report} _plot
66+ ${PYTHON_EXECUTABLE}
67+ ${ZEPHYR_BASE} /scripts/footprint/plot.py
68+ tfm_${report} .json
69+ DEPENDS tfm_${report} _report
70+ USES_TERMINAL
71+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
72+ )
5473 endforeach ()
5574
5675 add_custom_target (
@@ -76,6 +95,15 @@ if(CONFIG_TFM_BL2)
7695 USES_TERMINAL
7796 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
7897 )
98+ add_custom_target (
99+ bl2_${report} _plot
100+ ${PYTHON_EXECUTABLE}
101+ ${ZEPHYR_BASE} /scripts/footprint/plot.py
102+ bl2_${report} .json
103+ DEPENDS bl2_${report} _report
104+ USES_TERMINAL
105+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
106+ )
79107 endforeach ()
80108
81109 add_custom_target (
0 commit comments