Skip to content
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

cmake: modules: dts: print error message if DTC fails #87303

Merged

Conversation

valeriosetti
Copy link
Collaborator

Currently stderr is printed only if dtc encounters warnings, but it's not printed in case of errors. However this information can be useful to quickly identify and resolve the problem.

@zephyrbot zephyrbot added area: Build System size: XS A PR changing only a single line of code labels Mar 18, 2025
@tejlmand
Copy link
Collaborator

Similar proposal was opened a while back in #79236 but seems to have gone stale.

Please take a look at the comment history regarding cleanup and use of COMMAND_ERROR_IS_FATAL alternative the more complete zephyr_execute_process() wrapper until https://gitlab.kitware.com/cmake/cmake/-/issues/24815 has been fixed.

See also final comment here: #79236 (comment)

Currently stderr is printed only if dtc encounters warnings, but it's
not printed in case of errors. However this information can be useful
to quickly identify and resolve the problem.

To solve this let's add "COMMAND_ERROR_IS_FATAL ANY" to execute_process()
so that CMake will fail in case of errors and a proper message will be
printed on the output.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
@valeriosetti valeriosetti force-pushed the print-error-message-if-dtc-fails branch from a53efc7 to feb1519 Compare March 24, 2025 13:42
@valeriosetti
Copy link
Collaborator Author

Similar proposal was opened a while back in #79236 but seems to have gone stale.

Please take a look at the comment history regarding cleanup and use of COMMAND_ERROR_IS_FATAL alternative the more complete zephyr_execute_process() wrapper until https://gitlab.kitware.com/cmake/cmake/-/issues/24815 has been fixed.

See also final comment here: #79236 (comment)

FWIW I updated my PR following the suggestions on #87303, in particular the last one. If #87303 is resumed by its author feel free to close this one at any time ;)

@tejlmand
Copy link
Collaborator

FWIW I updated my PR following the suggestions on #87303,

@valeriosetti PR #87303 is this PR (your PR).
Guess you mean #79236 😉

@kartben kartben merged commit 13270a4 into zephyrproject-rtos:main Mar 24, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants