Skip to content

Commit 79ed6da

Browse files
committed
cmake: add a new "initlevels" target to print the init sequence
Add a new "initlevels" target that can be used to print a human readable version of the init sequence by running: west build -t initlevels. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 5212a4c commit 79ed6da

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -1816,6 +1816,15 @@ if(CONFIG_CHECK_INIT_PRIORITIES)
18161816
)
18171817
endif()
18181818

1819+
add_custom_target(
1820+
initlevels
1821+
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/check_init_priorities.py
1822+
--elf-file=${ZEPHYR_BINARY_DIR}/${KERNEL_ELF_NAME}
1823+
--initlevels
1824+
DEPENDS ${logical_target_for_zephyr_elf}
1825+
USES_TERMINAL
1826+
)
1827+
18191828
# Generate and use MCUboot related artifacts as needed.
18201829
if(CONFIG_BOOTLOADER_MCUBOOT)
18211830
get_target_property(signing_script zephyr_property_target SIGNING_SCRIPT)

0 commit comments

Comments
 (0)