@@ -23,15 +23,29 @@ multi-thread application.
2323Building and Running
2424********************
2525
26+ This project needs another firmware as the update payload. It must use another
27+ example's hex file, and should be specified on the command line
28+ as ZEPHYR_FIRMWARE_UPDATE_SAMPLE_BUILD. For example, to use the sample
29+ `tfm_integration/tfm_ipc ` as the payload:
30+
31+ .. code-block :: bash
32+
33+ cd < ZEPHYR_ROOT>
34+ west build -p -b lpcxpresso5s69_ns samples/tfm_integration/psa_firmware \
35+ -d build/lpcxpresso55s69_ns/tfm_integration/psa_firmware
36+ -- -DCONFIG_FIRMWARE_UPDATE_IMAGE=` realpath build/lpcxpresso55s69_ns/tfm_integration/tfm_ipc/zephyr_ns_signed.hex`
37+
38+
2639 This project outputs startup status and info to the console. It can be built and
2740executed on an ARM Cortex M33 target board or QEMU.
2841
2942This sample will only build on a Linux or macOS development system
3043(not Windows), and has been tested on the following setups:
3144
3245- macOS Big Sur using QEMU 6.0.0 with gcc-arm-none-eabi-9-2020-q2-update
46+ - Linux (NixOS) using QEMU 6.2.50 with gcc from Zephyr SDK 0.13.2
3347
34- On MPS2+ AN521 :
48+ On MPS3 AN547 :
3549===============
3650
37511. Build Zephyr with a non-secure configuration
@@ -42,7 +56,8 @@ On MPS2+ AN521:
4256 .. code-block :: bash
4357
4458 cd < ZEPHYR_ROOT>
45- west build -p -b mps2_an521_ns samples/tfm_integration/psa_firmware
59+ west build -p -b mps3_an547_ns samples/tfm_integration/psa_firmware
60+
4661
4762 Using ``cmake `` and ``ninja ``
4863
@@ -61,13 +76,13 @@ On MPS2+ AN521:
6176 cd < ZEPHYR_ROOT> /samples/tfm_integration/psa_firmware/
6277 rm -rf build
6378 mkdir build && cd build
64- cmake -DBOARD=mps2_an521_ns ..
79+ cmake -DBOARD=mps3_an547_ns ..
6580 make
6681
6782 2. Copy application binary files (mcuboot.bin and tfm_sign.bin) to
68- ``<MPS2 device name>/SOFTWARE/ ``.
83+ ``<MPS3 device name>/SOFTWARE/ ``.
6984
70- 3. Edit (e.g., with vim) the ``<MPS2 device name>/MB/HBI0263C/AN521 /images.txt ``
85+ 3. Edit (e.g., with vim) the ``<MPS3 device name>/MB/HBI0263C/AN547 /images.txt ``
7186 file, and update it as shown below:
7287
7388 .. code-block :: bash
@@ -83,20 +98,20 @@ On MPS2+ AN521:
8398 IMAGE1ADDRESS: 0x10080000
8499 IMAGE1FILE: \S OFTWARE\t fm_sign.bin ; TF-M with application binary blob
85100
86- 4. Save the file, exit the editor, and reset the MPS2+ board.
101+ 4. Save the file, exit the editor, and reset the MPS3 board.
87102
88103On QEMU:
89104========
90105
91- Build Zephyr with a non-secure configuration (``-DBOARD=mps2_an521_ns ``)
106+ Build Zephyr with a non-secure configuration (``-DBOARD=mps3_an547_ns ``)
92107and run it in qemu via the ``run `` command.
93108
94109 Using ``west ``
95110
96111 .. code-block :: bash
97112
98113 cd < ZEPHYR_ROOT>
99- west build -p -b mps2_an521_ns samples/tfm_integration/psa_firmware -t run
114+ west build -p -b mps3_an547_ns samples/tfm_integration/psa_firmware -t run
100115
101116 Using ``cmake `` and ``ninja ``
102117
@@ -105,7 +120,7 @@ and run it in qemu via the ``run`` command.
105120 cd < ZEPHYR_ROOT> /samples/tfm_integration/psa_firmware/
106121 rm -rf build
107122 mkdir build && cd build
108- cmake -GNinja -DBOARD=mps2_an521_ns ..
123+ cmake -GNinja -DBOARD=mps3_an547_ns ..
109124 ninja run
110125
111126 Using ``cmake `` and ``make ``
@@ -115,7 +130,7 @@ and run it in qemu via the ``run`` command.
115130 cd < ZEPHYR_ROOT> /samples/tfm_integration/psa_firmware/
116131 rm -rf build
117132 mkdir build && cd build
118- cmake -DBOARD=mps2_an521_ns ..
133+ cmake -DBOARD=mps3_an547_ns ..
119134 make run
120135
121136 On LPCxpresso55S69:
@@ -145,42 +160,28 @@ it's in an unknown state and can't be flashed.
145160
146161We need to reset the board manually after flashing the image to run this code.
147162
148- On nRF5340 and nRF9160:
149- =======================
150-
151- Build Zephyr with a non-secure configuration
152- (``-DBOARD=nrf5340dk_nrf5340_cpuappns `` or ``-DBOARD=nrf9160dk_nrf9160ns ``).
153-
154- Example, for nRF9160, using ``cmake `` and ``ninja ``
155-
156- .. code-block :: bash
157-
158- cd < ZEPHYR_ROOT> /samples/tfm_integration/psa_firmware/
159- rm -rf build
160- mkdir build && cd build
161- cmake -GNinja -DBOARD=nrf9160dk_nrf9160ns ..
162-
163- If building with BL2 (MCUboot bootloader) enabled, manually flash
164- the MCUboot bootloader image binary (``bl2.hex ``).
165-
166- Example, using ``nrfjprog `` on nRF9160:
167-
168- .. code-block :: bash
169-
170- nrfjprg -f NRF91 --program tfm/bin/bl2.hex --sectorerase
171-
172- Finally, flash the concatenated TF-M + Zephyr binary.
173-
174- Example, for nRF9160, using ``cmake `` and ``ninja ``
175-
176- .. code-block :: bash
177-
178- ninja flash
179-
180-
181163Sample Output
182164=============
183165
184166 .. code-block :: console
185167
186- TODO!
168+ [INF] Beginning TF-M provisioning
169+ [WRN] TFM_DUMMY_PROVISIONING is not suitable for production! This device is NOT SECURE
170+ [Sec Thread] Secure image initializing!
171+ TF-M FP mode: Software
172+ Booting TFM v1.5.0
173+ Creating an empty ITS flash layout.
174+ Creating an empty PS flash layout.
175+ *** Booting Zephyr OS build v3.0.0-rc1-321-gbe26b6a260d6 ***
176+ PSA Firmware API test
177+ Active NS image version: 0.0.0-0
178+ Starting FWU; Writing Firmware from 21000000 size 58466 bytes
179+ Wrote Firmware; Writing Header from 2100e462 size 432 bytes
180+ Wrote Header; Installing Image
181+ Installed New Firmware; Reboot Needed; Rebooting
182+ [WRN] This device was provisioned with dummy keys. This device is NOT SECURE
183+ [Sec Thread] Secure image initializing!
184+ TF-M FP mode: Software
185+ Booting TFM v1.5.0
186+ *** Booting Zephyr OS build v3.0.0-rc1-35-g03f2993ef07b ***
187+ Hello World from UserSpace! mps3_an547
0 commit comments