soc: nordic: Add run once and deferred reset configuration

Adds configuration that allows nRF53 and nRF91-based boards to be
flashed through west using sysbuild for multiple images with the
recover or erase options and prevent running those commands for
each image being flash, which would make the device unbootable.
Also defers reset whilst all images for the cores of these SoCs
are flashed.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2024-03-04 11:00:00 +00:00 committed by Fabio Baltieri
parent 8b62a16b57
commit 4b2d19f147

View file

@ -38,3 +38,62 @@ family:
- name: nrf9151 - name: nrf9151
- name: nrf9160 - name: nrf9160
- name: nrf9161 - name: nrf9161
# Recovery/erase is only needed once per core. Prevent resetting the cores whilst flashing
# multiple images until all images for each core have been flashed, this allows security
# bits to be set during programming without them interfering with additional flashing
# operations.
runners:
run_once:
'--recover':
- runners:
- nrfjprog
run: first
groups:
- qualifiers:
- nrf51([0-9]{3})((.+)?)
- qualifiers:
- nrf52([0-9]{3})((.+)?)
- qualifiers:
- nrf5340/cpunet
- nrf5340/cpuapp
- nrf5340/cpuapp/ns
- qualifiers:
- nrf9160
- nrf9160/ns
'--erase':
- runners:
- nrfjprog
- jlink
run: first
groups:
- qualifiers:
- nrf51([0-9]{3})((.+)?)
- qualifiers:
- nrf52([0-9]{3})((.+)?)
- qualifiers:
- nrf5340/cpunet
- qualifiers:
- nrf5340/cpuapp
- nrf5340/cpuapp/ns
- qualifiers:
- nrf9160
- nrf9160/ns
'--reset':
- runners:
- nrfjprog
- jlink
run: last
groups:
- qualifiers:
- nrf51([0-9]{3})((.+)?)
- qualifiers:
- nrf52([0-9]{3})((.+)?)
- qualifiers:
- nrf5340/cpunet
- qualifiers:
- nrf5340/cpuapp
- nrf5340/cpuapp/ns
- qualifiers:
- nrf9160
- nrf9160/ns