-
Notifications
You must be signed in to change notification settings - Fork 702
nrf54h20: replace nrf-regtool with gen_periphconf_entries.py #3276
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
Open
jonathannilsen
wants to merge
10
commits into
nrfconnect:main
Choose a base branch
from
jonathannilsen:regtool-removal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,827
−150
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
007e2bb
to
e16e630
Compare
3ba9729
to
1fda7f1
Compare
…PET_ROOT When SNIPPET is added to the build, it is added to all images. But not all images have the test directory added to their SNIPPET_ROOT, so we also update the SNIPPET_ROOT. This allows, for instance, the uicr image of nrf54H to find this snippet. Ref: NCSDK-NONE Signed-off-by: Sebastian Bøe <[email protected]> (cherry picked from commit 5f9d20c)
Reorganize how gen_uicr.py is invoked. Instead of invoking it from one of the Zephyr images we invoke it from a new special Zephyr image called uicr. This uicr Zephyr image is flashed in the same way as normal Zephyr images so special handling in the runner is no longer necessary. Also, we simplify gen_uicr.py by moving parsing of Kconfig/DT from gen_uicr.py to CMake. Signed-off-by: Sebastian Bøe <[email protected]> (cherry picked from commit ac851ca)
…E bug Fix bug where users were unable to name their binary Bøe when building for nrf54h20. Signed-off-by: Sebastian Bøe <[email protected]> (cherry picked from commit 180f1f8)
Update the C struct for UICR to the latest revision. Signed-off-by: Sebastian Bøe <[email protected]> (cherry picked from commit 67b0e04)
Add support for secondary firmware in gen_uicr.py. Signed-off-by: Sebastian Bøe <[email protected]> (cherry picked from commit 3648cd8)
Added support for the IronSide bootmode service which allows requesting a reboot into secondary firmware boot mode. In this mode, the secondary configuration defined in UICR is applied instead of the primary one. The service provides the ironside_bootmode_secondary_reboot() function that can pass message data to the boot report of the CPU booted in the secondary boot mode. Signed-off-by: Sebastian Bøe <[email protected]> (cherry picked from commit 377a18c)
Clean up error code docs. Signed-off-by: Sebastian Bøe <[email protected]> (cherry picked from commit 363bad0)
Although not reproducible locally, it has been observed in CI that the uicr image will not always be the last image to be run. To ensure it is the last image to be run we have it depend on the 'image' image when defined. The uicr image is generated based on all other images in the build and must therefore run last. Signed-off-by: Sebastian Bøe <[email protected]> (cherry picked from commit 32c67762568c1aeb4484c2abf621f3f11f0ccf78)
… on devicetree Add build system support for populating the PERIPHCONF (global domain peripheral configuration), based on nodes and properties found in the devicetree. This should make it so all samples and tests that were broken by the move to IronSide SE now function correctly without workarounds or manual steps. When enabled, a new python script called gen_periphconf_entries.py is run when building. The script iterates over nodes and properties in the devicetree and generates a C file called periphconf_entries_generated.c in the build directory, which is added as a source file. The C file uses the macros from uicr.h to configure the global domain according to the devicetree. The PERIPHCONF entry generation is enabled by default when building for nrf54h20dk/nrf54h20/cpuapp and nrf54h20dk/nrf54h20/cpurad. It will also be used on nrf9280 soon, therefore it is placed in the common uicr directory. This new feature does the same job as nrf-regtool did when building for nrf54h20 before, and is compatible by the bindings that were used by nrf-regtool. Signed-off-by: Jonathan Nilsen <[email protected]> (cherry picked from commit 1cb9408f1934ad72db630a92b3c3ff10b7f6fd7b)
…ut sysbuild Because generation and programming of UICR + PERIPHCONF artifacts depend on the 'uicr' image which in turn must be included by Sysbuild, many if not most nrf54h20 applications will need to be built using Sysbuild to function as intended. To make this known to the user, print a CMake warning whenever CONFIG_NRF_PERIPHCONF_SECTION=y but Sysbuild is not being used. Signed-off-by: Jonathan Nilsen <[email protected]> (cherry picked from commit 6b93eacb6c376f209e72ebb60fce0ddc32dddb6d)
1fda7f1
to
3a66249
Compare
karstenkoenig
approved these changes
Sep 18, 2025
hakonfam
approved these changes
Sep 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Manifest PR: nrfconnect/sdk-nrf/pull/24028
Replaces nrf-regtool with a new script in zephyr.
Includes the commits from #3202