Skip to content

Conversation

@e-rk
Copy link
Contributor

@e-rk e-rk commented May 28, 2024

The flasher was unconditionally cleaning the UICR area, even when the application didn't have a new configuration generated. This can happen, when CONFIG_NRF_REGTOOL_GENERATE_UICR=n. In such case, keep the old UICR configuration on the device.

A real scenario where we should set CONFIG_NRF_REGTOOL_GENERATE_UICR=n
is when building multiple firmware images that are meant to run one
domain. The primary application build generates the UICR configuration
and secondary images don't. Before this change, the flashing process of
the primary application would write new UICR configuration, but the
flashing process of secondary images would erase it.

@zephyrbot zephyrbot added the area: West West utility label May 28, 2024
@e-rk e-rk requested review from gmarull and removed request for mbolivar-ampere May 28, 2024 09:55
The flasher was unconditionally cleaning the UICR area, even when the
application didn't have a new configuration generated. This can happen,
when CONFIG_NRF_REGTOOL_GENERATE_UICR=n. In such case, keep the old UICR
configuration on the device.

A real scenario where we should set CONFIG_NRF_REGTOOL_GENERATE_UICR=n
is when building multiple firmware images that are meant to run one
domain. The primary application build generates the UICR configuration
and secondary images don't. Before this change, the flashing process of
the primary application would write new UICR configuration, but the
flashing process of secondary images would erase it.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
e-rk added a commit to e-rk/sdk-zephyr that referenced this pull request May 28, 2024
…UICR cleanup

The flasher was unconditionally cleaning the UICR area, even when the
application didn't have a new configuration generated. This can happen,
when CONFIG_NRF_REGTOOL_GENERATE_UICR=n. In such case, keep the old UICR
configuration on the device.

A real scenario where we should set CONFIG_NRF_REGTOOL_GENERATE_UICR=n
is when building multiple firmware images that are meant to run one
domain. The primary application build generates the UICR configuration
and secondary images don't. Before this change, the flashing process of
the primary application would write new UICR configuration, but the
flashing process of secondary images would erase it.

Upstream PR: zephyrproject-rtos/zephyr#73391

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
@fabiobaltieri fabiobaltieri merged commit 64bf17d into zephyrproject-rtos:main May 30, 2024
rlubos pushed a commit to nrfconnect/sdk-zephyr that referenced this pull request May 31, 2024
…UICR cleanup

The flasher was unconditionally cleaning the UICR area, even when the
application didn't have a new configuration generated. This can happen,
when CONFIG_NRF_REGTOOL_GENERATE_UICR=n. In such case, keep the old UICR
configuration on the device.

A real scenario where we should set CONFIG_NRF_REGTOOL_GENERATE_UICR=n
is when building multiple firmware images that are meant to run one
domain. The primary application build generates the UICR configuration
and secondary images don't. Before this change, the flashing process of
the primary application would write new UICR configuration, but the
flashing process of secondary images would erase it.

Upstream PR: zephyrproject-rtos/zephyr#73391

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
anangl pushed a commit to anangl/sdk-zephyr that referenced this pull request Jul 1, 2024
…UICR cleanup

The flasher was unconditionally cleaning the UICR area, even when the
application didn't have a new configuration generated. This can happen,
when CONFIG_NRF_REGTOOL_GENERATE_UICR=n. In such case, keep the old UICR
configuration on the device.

A real scenario where we should set CONFIG_NRF_REGTOOL_GENERATE_UICR=n
is when building multiple firmware images that are meant to run one
domain. The primary application build generates the UICR configuration
and secondary images don't. Before this change, the flashing process of
the primary application would write new UICR configuration, but the
flashing process of secondary images would erase it.

Upstream PR: zephyrproject-rtos/zephyr#73391

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
(cherry picked from commit 78d3dec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: West West utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants