Skip to content

Commit 3c3abe1

Browse files
scripts: Add HTML build report script
This change adds a script to generate an HTML report, invoked via west, providing a consolidated and user-friendly view of various build artifacts and metrics. This includes footprint information (as both tables and plots), configuration tracing, sys init levels, an interactive devicetree browser, and more. Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
1 parent 0421208 commit 3c3abe1

File tree

15 files changed

+1994
-0
lines changed

15 files changed

+1994
-0
lines changed

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
build*/
1818
!doc/build/
1919
!scripts/build
20+
!scripts/buildreport
2021
!share/sysbuild/build
2122
!tests/drivers/build_all
2223
!scripts/pylib/build_helpers

‎cmake/reports/CMakeLists.txt‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,14 @@ if(NOT ${PAHOLE} STREQUAL PAHOLE-NOTFOUND)
156156
USES_TERMINAL
157157
)
158158
endif()
159+
160+
add_custom_target(
161+
buildreport
162+
${PYTHON_EXECUTABLE}
163+
${ZEPHYR_BASE}/scripts/buildreport/buildreport.py
164+
--output ${CMAKE_BINARY_DIR}/report
165+
--zephyr-base ${ZEPHYR_BASE}
166+
${CMAKE_BINARY_DIR}
167+
DEPENDS ${logical_target_for_zephyr_elf}
168+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
169+
)

‎cmake/usage/usage.cmake‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ message(" ram_plot - Build and create RAM usage in a sunburst chart as a vi
3333
message(" rom_plot - Build and create ROM usage in a sunburst chart as a visual representation")
3434
message(" traceconfig - Generate a file in the build directory that details how each symbol got its final value")
3535
message(" footprint - Create JSON RAM/ROM usage report in the build directory")
36+
message(" buildreport - Generate an HTML report with footprint, traceconfig, initlevels, devicetree, and other details")
3637
message(" initlevels - Display the initialization sequence")
3738
message(" boards - Display supported boards")
3839
message(" shields - Display supported shields")

0 commit comments

Comments
 (0)