Skip to content

Conversation

@57300
Copy link
Contributor

@57300 57300 commented Nov 4, 2024

On nRF54H and nRF92, booting certain cores requires programming a UICR, which is normally generated using nrf-regtool. This should be considered an optional dependency, because we do not wish to force non-Nordic users to install it just to work with Zephyr, or just for build-only tests.

When nrf-regtool is not installed, a CMake warning will be displayed, but people ignore warnings all the time. As the last line of defense, check for missing UICR in the nrfutil flash runner, to prevent our users from unintentionally programming unbootable firmware. Show a fatal error specifically if CONFIG_NRF_REGTOOL_GENERATE_UICR=y, yet no UICR exists.

Fixes #79380

On nRF54H and nRF92, booting certain cores requires programming a UICR,
which is normally generated using nrf-regtool. This should be considered
an optional dependency, because we do not wish to force non-Nordic users
to install it just to work with Zephyr, or just for build-only tests.

When nrf-regtool is not installed, a CMake warning will be displayed,
but people ignore warnings all the time. As the last line of defense,
check for missing UICR in the nrfutil flash runner, to prevent our users
from unintentionally programming unbootable firmware. Show a fatal error
specifically if CONFIG_NRF_REGTOOL_GENERATE_UICR=y, yet no UICR exists.

Signed-off-by: Grzegorz Swiderski <[email protected]>
@carlescufi carlescufi added the bug The issue is a bug, or the PR is fixing a bug label Nov 4, 2024
@carlescufi carlescufi added this to the v4.0.0 milestone Nov 4, 2024
@carlescufi carlescufi changed the title west: runners: nrf: Check for missing UICR west: runners: nrf: Fix for check for missing UICR Nov 4, 2024
@carlescufi carlescufi requested a review from gmarull November 4, 2024 15:39
@dkalowsk
Copy link
Contributor

dkalowsk commented Nov 6, 2024

@57300 this is going to need a GitHub issue attached to be merged to 4.0 at this point. Is there one?

@57300
Copy link
Contributor Author

57300 commented Nov 6, 2024

@57300 this is going to need a GitHub issue attached to be merged to 4.0 at this point. Is there one?

@dkalowsk Yes, I just linked the issue that this fix is part of.

@mmahadevan108 mmahadevan108 merged commit 8fc161f into zephyrproject-rtos:main Nov 6, 2024
42 checks passed
@57300 57300 deleted the uicr-flash-runner-check branch April 9, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: West West utility bug The issue is a bug, or the PR is fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Twister failing due to missing nrf-regtool

7 participants