You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed nrfjprog commands to nrfutil in the AP-Protect documentation.
Updated the note about multi-image builds.
NCSDK-30148.
Signed-off-by: Grzegorz Ferenc <[email protected]>
Copy file name to clipboardExpand all lines: doc/nrf/security/ap_protect.rst
+31-18Lines changed: 31 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,10 +179,10 @@ Enabling the Kconfig option writes the debugger register in the ``SystemInit()``
179
179
In addition to this, the ``UICR.APPROTECT`` register should be written as instructed in :ref:`app_approtect_uicr_approtect`.
180
180
181
181
.. note::
182
-
For multi-image builds, this Kconfig option needs to be set for the first image (usually a bootloader).
182
+
For multi-image builds, :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` needs to be set for the first image (usually a bootloader).
183
183
Otherwise, the software AP-Protect will not be sufficient as the debugger can be attached to the device after the first image opens the software AP-Protect with the :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` Kconfig option, which is the default value.
184
184
185
-
When using sysbuild, set the ``SB_CONFIG_APPROTECT_LOCK`` sysbuild Kconfig option, which enables the :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` Kconfig option for all images.
185
+
You can set this option manually or use sysbuild's ``SB_CONFIG_APPROTECT_LOCK`` Kconfig option to set it for all images at once.
186
186
187
187
.. important::
188
188
On the nRF91x1 Series devices, the register setting related to the :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` Kconfig option does not persist in System ON IDLE mode.
@@ -200,11 +200,11 @@ You can use this option for example to implement the authenticated debug and loc
200
200
See the SoC or SiP hardware documentation for more information.
201
201
202
202
.. note::
203
-
For multi-image builds, this Kconfig option has to be set for all images.
203
+
For multi-image builds, :kconfig:option:`CONFIG_NRF_APPROTECT_USER_HANDLING` needs to be set for all images.
204
204
The default value is to open the device if the ``UICR.APPROTECT`` register is not set.
205
205
This allows the debugger to be attached to the device.
206
206
207
-
When using sysbuild, set the ``SB_CONFIG_APPROTECT_USER_HANDLING`` sysbuild Kconfig option, which enables the :kconfig:option:`CONFIG_NRF_APPROTECT_USER_HANDLING` Kconfig option for all images.
207
+
You can set this option manually for each image or use sysbuild's ``SB_CONFIG_APPROTECT_USER_HANDLING`` Kconfig option to set it for all images at once.
208
208
209
209
.. _app_approtect_ncs_use_uicr:
210
210
@@ -227,16 +227,28 @@ If the access port protection is configured this way, it cannot be disabled with
227
227
.. note::
228
228
This is the only mechanism supported by the nRF52 Series and the nRF9160 devices that do not support both hardware and software AP-Protect.
229
229
230
-
To lock the ``UICR.APPROTECT`` register, complete the following steps:
230
+
To lock the ``UICR.APPROTECT`` register, use the following set of commands:
231
231
232
-
.. code-block:: console
232
+
.. tabs::
233
233
234
-
nrfjprog --rbp ALL
234
+
.. tab:: SoCs or SiPs other than nRF5340
235
235
236
-
.. note::
237
-
|nrfjprog_deprecation_note|
236
+
.. code-block:: console
237
+
238
+
nrfutil device protection-set All
239
+
240
+
.. tab:: nRF5340
241
+
242
+
.. code-block:: console
243
+
244
+
nrfutil device protection-set All --core Network
245
+
nrfutil device protection-set All
238
246
239
-
This command enables the hardware AP-Protect (and Secure AP-Protect) and resets the device.
247
+
This set of commands enables the hardware AP-Protect (and Secure AP-Protect) and resets the device.
248
+
249
+
.. note::
250
+
With devices that use software AP-Protect, nRF Util cannot enable hardware AP-Protect if the software AP-Protect is already enabled.
251
+
If you encounter errors with nRF Util, make sure that :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` is set.
240
252
241
253
.. _app_secure_approtect:
242
254
@@ -266,10 +278,10 @@ Enabling this Kconfig option writes the secure debugger register in the ``System
266
278
In addition to this, the ``UICR.SECUREAPPROTECT`` register should be written as instructed in :ref:`app_secure_approtect_uicr_approtect`.
267
279
268
280
.. note::
269
-
For multi-image builds, this Kconfig option needs to be set for the first image (usually a bootloader).
281
+
For multi-image builds, :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` needs to be set for the first image (usually a bootloader).
270
282
Otherwise, the software Secure AP-Protect will not be sufficient as the debugger can be attached to the SPE after the first image opens the software Secure AP-Protect with the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USE_UICR` Kconfig option, which is the default value.
271
283
272
-
When using sysbuild, set the sysbuild Kconfig option ``SB_CONFIG_SECURE_APPROTECT_LOCK``, which enables the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` Kconfig option for all images.
284
+
You can set this option manually or use sysbuild's ``SB_CONFIG_SECURE_APPROTECT_LOCK`` Kconfig option to enable it for all images.
273
285
274
286
.. important::
275
287
On the nRF91x1 Series devices, the register setting related to the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` Kconfig option does not persist in System ON IDLE mode.
@@ -285,11 +297,11 @@ You can for example use this option to implement an authenticated debug and lock
285
297
See the SoC or SiP hardware documentation for more information.
286
298
287
299
.. note::
288
-
For multi-image builds, this Kconfig option needs to be set for all images.
300
+
With multi-image builds, :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING` needs to be set for all images.
289
301
The default value is to open the device if the ``UICR.SECUREAPPROTECT`` is not set.
290
302
This allows the debugger to be attached to the device.
291
303
292
-
When using sysbuild, set the ``SB_CONFIG_SECURE_APPROTECT_USER_HANDLING`` sysbuild Kconfig option, which enables the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING` Kconfig option for all images.
304
+
You can set this option manually for each image or use sysbuild's ``SB_CONFIG_SECURE_APPROTECT_USER_HANDLING`` Kconfig option to set it for all images at once.
293
305
294
306
Enabling software Secure AP-Protect with :kconfig:option:`CONFIG_SECURE_NRF_APPROTECT_USE_UICR`
@@ -311,9 +323,10 @@ To enable only the hardware Secure AP-Protect mechanism, run the following comma
311
323
312
324
.. code-block:: console
313
325
314
-
nrfjprog --rbp SECURE
315
-
316
-
.. note::
317
-
|nrfjprog_deprecation_note|
326
+
nrfutil device protection-set SecureRegions
318
327
319
328
This command enables hardware Secure AP-Protect and resets the device.
329
+
330
+
.. note::
331
+
With devices that use software AP-Protect, nRF Util cannot enable hardware Secure AP-Protect if the software Secure AP-Protect is already enabled.
332
+
If you encounter errors with nRF Util, make sure that :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` and :kconfig:option:`CONFIG_SECURE_NRF_APPROTECT_USE_UICR` are set.
0 commit comments