Skip to content

Commit f804469

Browse files
nordicjmkartben
authored andcommitted
cmake: reports: Add support for JSON prefix
Adds support for prefixing files with the target of bl2 or tfm Signed-off-by: Jamie McCrae <[email protected]>
1 parent 7cef0e3 commit f804469

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

cmake/reports/CMakeLists.txt

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ foreach(report ram_report rom_report footprint)
2929
)
3030
endforeach()
3131

32-
if (CONFIG_BUILD_WITH_TFM)
32+
if(CONFIG_BUILD_WITH_TFM)
3333
foreach(report ram_report rom_report footprint)
3434
add_custom_target(
3535
tfm_${report}
@@ -40,6 +40,7 @@ if (CONFIG_BUILD_WITH_TFM)
4040
-o ${CMAKE_BINARY_DIR}
4141
${workspace_arg}
4242
-d ${report_depth}
43+
--json tfm_${report}.json
4344
${flag_for_${report}}
4445
DEPENDS tfm
4546
USES_TERMINAL
@@ -48,22 +49,23 @@ if (CONFIG_BUILD_WITH_TFM)
4849
endforeach()
4950
endif()
5051

51-
if (CONFIG_TFM_BL2)
52+
if(CONFIG_TFM_BL2)
5253
foreach(report ram_report rom_report footprint)
53-
add_custom_target(
54-
bl2_${report}
55-
${PYTHON_EXECUTABLE}
56-
${ZEPHYR_BASE}/scripts/footprint/size_report
57-
-k $<TARGET_PROPERTY:tfm,BL2_ELF_FILE>
58-
-z ${ZEPHYR_BASE}
59-
-o ${CMAKE_BINARY_DIR}
60-
${workspace_arg}
61-
-d ${report_depth}
62-
${flag_for_${report}}
63-
DEPENDS tfm
64-
USES_TERMINAL
65-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
66-
)
54+
add_custom_target(
55+
bl2_${report}
56+
${PYTHON_EXECUTABLE}
57+
${ZEPHYR_BASE}/scripts/footprint/size_report
58+
-k $<TARGET_PROPERTY:tfm,BL2_ELF_FILE>
59+
-z ${ZEPHYR_BASE}
60+
-o ${CMAKE_BINARY_DIR}
61+
${workspace_arg}
62+
-d ${report_depth}
63+
--json bl2_${report}.json
64+
${flag_for_${report}}
65+
DEPENDS tfm
66+
USES_TERMINAL
67+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
68+
)
6769
endforeach()
6870
endif()
6971

0 commit comments

Comments
 (0)