From 8be0bf17adee5cf5f93191d08761a0e2b8474ced Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Mon, 11 Sep 2023 15:09:14 +0000 Subject: [PATCH] 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 --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac9cf9ca0fdeb9..d0b25d16c8c77e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1816,6 +1816,15 @@ if(CONFIG_CHECK_INIT_PRIORITIES) ) endif() +add_custom_target( + initlevels + COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/check_init_priorities.py + --elf-file=${ZEPHYR_BINARY_DIR}/${KERNEL_ELF_NAME} + --initlevels + DEPENDS ${logical_target_for_zephyr_elf} + USES_TERMINAL +) + # Generate and use MCUboot related artifacts as needed. if(CONFIG_BOOTLOADER_MCUBOOT) get_target_property(signing_script zephyr_property_target SIGNING_SCRIPT)