Skip to content

Conversation

@nordicjm
Copy link
Contributor

Adds a semi-zephyr project which will lock the bootconf area on supported devices. Generates and flashes a seprate hex file which is also added into the production hex file. Some issues with CMake have also been tidied up to improve readability

Adds a semi-zephyr project which will lock the bootconf area on
supported devices. Generates and flashes a seprate hex file which
is also added into the production hex file. Some issues with CMake
have also been tidied up to improve readability

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
@nordicjm nordicjm requested review from a team as code owners November 19, 2025 09:17
@CLAassistant
Copy link

CLAassistant commented Nov 19, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 19, 2025
@github-actions
Copy link

You can find the documentation preview for this PR here.

@nordicjm nordicjm changed the title sysbuild: Add bootconf project sysbuild: Add bootconf image Nov 19, 2025
@nvlsianpu nvlsianpu added this to the v1.0.0 milestone Nov 19, 2025
Copy link
Contributor

@anhmolt anhmolt left a comment

Choose a reason for hiding this comment

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

Could use some documentation, and changelog(?).

Maybe mention here that the boot partition will be protected when CONFIG_BM_BOOT_BOOTCONF_LOCK_WRITES is set, and that recover or erase needs to be used to be able to flash the mcuboot+softdevice image again.

In any case, west flash will fail without --recover or --erase options after having programmed the bootconf "image". As intended. Could be good to explain why, and what to do, when seeing

-- west flash: using runner nrfutil
Using board 0123456789
-- runners.nrfutil: Flashing file: /ncs/nrf-bm/samples/bluetooth/ble_hids_keyboard/build/mcuboot/zephyr/zephyr_signed_softdevice_flash_metadata.hex
-- runners.nrfutil: Connecting to probe
-- runners.nrfutil: Programming image
Error: One or more batch tasks failed:
 * 0123456789: Device error: Address 0x00000000 is in a protected RRAMC region (Generic)

FATAL ERROR: command exited with status 1: nrfutil --json device x-execute-batch --batch-path /ncs/nrf-bm/samples/bluetooth/ble_hids_keyboard/build/mcuboot/zephyr/generated_nrfutil_batch.json --serial-number 0123456789

# Create the runners_yaml_props_target that flash system expects
add_custom_target(runners_yaml_props_target)

# Set hex_file property to point to zephyr.hex in this directory
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment accurate?

)

# Override the runners.yaml path to use CMAKE_CURRENT_BINARY_DIR/zephyr instead of
# PROJECT_BINARY_DIR, this ensures runners.yaml is generated at <build>/softdevice/zephyr where
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs updating. softdevice is not correct here.


set(BYPRODUCT_HEX_NAME
"${CMAKE_BINARY_DIR}/bootconf.hex"
CACHE FILEPATH "MCUboot with signed softdevice and flash metadata hex file" FORCE
Copy link
Contributor

@anhmolt anhmolt Nov 20, 2025

Choose a reason for hiding this comment

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

Needs update(?)

Copy link
Contributor

@anhmolt anhmolt left a comment

Choose a reason for hiding this comment

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

The incorrect comments can be fixed later. Let's get this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants