-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripts: check_init_priorities: use the zephyr executable file [WAS: scripts: add dump_init_order.py] #62459
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1811,12 +1811,22 @@ if(CONFIG_CHECK_INIT_PRIORITIES) | |
list(APPEND | ||
post_build_commands | ||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/check_init_priorities.py | ||
--build-dir ${PROJECT_BINARY_DIR}/.. | ||
--edt-pickle ${EDT_PICKLE} | ||
--elf-file=${ZEPHYR_BINARY_DIR}/${KERNEL_ELF_NAME} | ||
${fail_on_warning} | ||
) | ||
endif() | ||
|
||
if(NOT CMAKE_C_COMPILER_ID STREQUAL "ARMClang") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not fond, of it, but I see your reasoning here. and users could want to run the target even with the kconfig to So accepted for now, and let's see if we can find a way with armclang to support the check init feature. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I'm sure it can be fixed, those stripping options in I'll file an issue about it, it's worth discussing. |
||
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 | ||
) | ||
endif() | ||
|
||
# Generate and use MCUboot related artifacts as needed. | ||
if(CONFIG_BOOTLOADER_MCUBOOT) | ||
get_target_property(signing_script zephyr_property_target SIGNING_SCRIPT) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing with
armclang
with following error:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bummer. Would you be able to send an elf file over to me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd honestly not block this PR because it doesn't work with armclang, but exclude the target if the toolchain being used is armclang. It can be investigated later by users with access to it. Restricting progress on OSS projects because of licensed software is not a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was about to voice the same opinion over into #60031, we can't really depend on "ping someone who can carry out such test". Either the tool is generally available and we can do a CI integration or regressions will have to be fixed out of band.
That said, for this one since se managed to catch the regression I'm happy to look into it if you can give me something to work on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it work with public clang?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks alright to me, the armclang linker must be discarding or changing the symbols, maybe the the binary is stripped? Hard to say without a file...
https://github.com/zephyrproject-rtos/zephyr/blob/main/cmake/bintools/armclang/elfconvert_command.cmake#L8 there's these bits of config kicking around, I checked and stripping would cause that error (obviously...)