Skip to content

Conversation

SebastianBoe
Copy link
Contributor

@SebastianBoe SebastianBoe commented Aug 15, 2025

Misc. ironside work september 3.

@SebastianBoe SebastianBoe force-pushed the ncs_ps branch 2 times, most recently from dc098ca to 546e163 Compare August 18, 2025 10:20
@SebastianBoe SebastianBoe changed the title [NOT FOR REVIEW] [FOR CI TESTING ONLY] [nrf toup] nordic: Reorganize how gen_uicr.py is invoked [nrf toup] nordic: Reorganize how gen_uicr.py is invoked Aug 18, 2025
Copy link
Contributor

@karstenkoenig karstenkoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah super nice, but please split into independent hex files again

Copy link
Contributor

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment on lines +46 to +49
# Use CMAKE_VERBOSE_MAKEFILE to silence an unused-variable warning.
if(CMAKE_VERBOSE_MAKEFILE)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

@SebastianBoe SebastianBoe Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got 5 lines of warning in the logs when this variable went unreferenced.

I assume SYSBUILD passes it to each image, and Zephyr usually references it, but since I have this minimal Zephyr it goes unreferenced.

@jonathannilsen jonathannilsen self-requested a review August 20, 2025 13:39
@SebastianBoe
Copy link
Contributor Author

@karstenkoenig , @jonathannilsen , @nordicjm :

All feedback addressed, will reupload to upstream zephyr soon.

@SebastianBoe
Copy link
Contributor Author

These patches are now up for review upstream in zephyrproject-rtos/zephyr#94796

@SebastianBoe SebastianBoe changed the title [nrf toup] nordic: Reorganize how gen_uicr.py is invoked [nrf fromtree] nordic: Reorganize how gen_uicr.py is invoked Sep 1, 2025
@SebastianBoe SebastianBoe changed the title [nrf fromtree] nordic: Reorganize how gen_uicr.py is invoked Misc. ironside work september 3. Sep 3, 2025
@SebastianBoe SebastianBoe force-pushed the ncs_ps branch 4 times, most recently from 444148b to d14185f Compare September 5, 2025 14:37
…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.

Upstream PR #: 95785

Signed-off-by: Sebastian Bøe <[email protected]>
@jonathannilsen
Copy link
Contributor

Superseded by #3276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants