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
Copy file name to clipboardExpand all lines: samples/tfm/tfm_psa_template/README.rst
+88-3Lines changed: 88 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ This sample uses Trusted Firmware-M, nRF Secure Immutable bootloader and MCUboot
25
25
It includes provisioning the device with keys and being able to perform a device firmware update.
26
26
The sample prints information about the identity of the device and the firmware versions that are currently running.
27
27
28
+
With nRF5340 this sample also includes the :ref:`B0n bootloader <nc_bootloader>` and :ref:`empty_net_core <nrf5340_empty_net_core>` for demonstrating the network core firmware update process.
29
+
28
30
Building and running
29
31
********************
30
32
@@ -38,7 +40,7 @@ Build and flash the provisioning image sample to provision the device with the P
38
40
.. code-block:: console
39
41
40
42
west build -b nrf5340dk/nrf5340/cpuapp nrf/samples/tfm/provisioning_image -d build_provisioning_image
41
-
west flash --erase -d build_provisioning_image
43
+
west flash --erase --recover -d build_provisioning_image
42
44
43
45
Build and flash the TF-M PSA template sample.
44
46
Do not flash with ``--erase`` as this will erase the PSA platform security parameters and they will be lost.
@@ -145,6 +147,10 @@ See :ref:`ug_fw_update_keys` for more information on how to generate and use key
145
147
The bootloader and the application can be updated using the :file:`mcumgr` command-line tool.
146
148
See :zephyr:code-sample:`smp-svr` for installation and usage instructions.
147
149
150
+
.. note::
151
+
152
+
Remember to rebuild the sample with the updated keys before proceeding with the firmware update.
153
+
148
154
Application and TF-M firmware update
149
155
====================================
150
156
@@ -189,7 +195,7 @@ To upload a new bootloader image, build a bootloader targeting the correct bootl
189
195
190
196
.. code-block:: console
191
197
192
-
west build -b nrf5340dk/nrf5340/cpuapp/ns nrf/samples/tfm/tfm_psa_template \
198
+
west build -b nrf5340dk/nrf5340/cpuapp/ns nrf/samples/tfm/tfm_psa_template -d build_update \
193
199
-Dmcuboot_CONFIG_FW_INFO_FIRMWARE_VERSION=2
194
200
195
201
List the current firmware images and upload a bootloader image that targets the non-active bootloader slot.
@@ -198,7 +204,7 @@ List the current firmware images and upload a bootloader image that targets the
198
204
199
205
mcumgr --conntype serial --connstring dev=/dev/ttyACM1,baud=115200,mtu=512 image list
200
206
mcumgr --conntype serial --connstring dev=/dev/ttyACM1,baud=115200,mtu=512 image upload \
Then upload the new application and network core images to the device. Note that the application image is uploaded to the application slot and the network core image is uploaded to the network core slot.
272
+
273
+
.. code-block:: console
274
+
275
+
mcumgr --conntype serial --connstring dev=/dev/ttyACM1,baud=115200,mtu=512 image upload \
mcumgr --conntype serial --connstring dev=/dev/ttyACM1,baud=115200,mtu=512 image list
282
+
283
+
Once the images are uploaded, the hash of the images is shown in the image list. The application image is image 1 in slot 0 and the network core image is image 1 in slot 1.
284
+
To allow the application and network core images to be updated simultaneously, first confirm the network core image and then the application image.
0 commit comments