Lines Matching +full:ninja +full:- +full:build

1 .. zephyr:code-sample:: tfm_ipc
2 :name: TF-M IPC
4 Implement communication between the secure and non-secure images using IPC.
9 This is a simple TF-M integration example that can be used with an ARMv8-M
12 It uses **IPC Mode** for communication, where TF-M API calls are made to the
16 Zephyr uses Trusted Firmware (TF-M) Platform Security Architecture (PSA) APIs
18 non-secure configuration.
20 The sample prints test info to the console either as a single-thread or
21 multi-thread application.
23 The sample reboots after 5 seconds to demonstrate rebooting with TF-M.
24 The sys_reboot call is routed to TF-M, since the nonsecure app is not allowed
36 #. Build Zephyr with a non-secure configuration (``-DBOARD=mps2/an521/cpu0/ns``).
38 .. code-block:: bash
41 mkdir build
42 cd build
43 cmake -DBOARD=mps2/an521/cpu0/ns ..
48 .. code-block:: bash
50 $ west build -p -b mps2/an521/cpu0/ns zephyr/samples/tfm_integration/tfm_ipc
56 .. code-block:: bash
67 IMAGE1FILE: \SOFTWARE\tfm_sign.bin ; TF-M with application binary blob
73 .. code-block:: bash
76 arm-none-eabi-gcc can not be found. Either put arm-none-eabi-gcc on the
80 folder to update the ``-DGNUARM_PATH=/opt/toolchain/arm-none-eabi`` path.
86 dual core ARM Cortex-M33 setup, also allows you to run TF-M tests using QEMU if
87 you don't have access to a supported ARMv8-M development board.
89 As part of the normal build process above, a binary is also produced that can
90 be run via ``qemu-system-arm``. The binary can be executed as follows:
92 .. code-block:: bash
94 qemu-system-arm -M mps2-an521 -device loader,file=build/zephyr/tfm_merged.hex -serial stdio
96 You can also run the binary as part of the ``west`` build process by appending
97 the ``-t run`` flag to the end of your build command, or in the case of
98 ninja or make, adding the ``run`` commands:
100 .. code-block:: bash
102 $ west build -b mps2/an521/cpu0/ns zephyr/samples/tfm_integration/tfm_ipc -t run
104 Or, post build:
106 .. code-block:: bash
108 $ ninja run
110 On ST Nucleo L552ZE Q or STM32L562E-DK Discovery:
115 Build Zephyr with a non-secure configuration:
117 Example, for building non-secure configuration for Nucleo L552ZE Q
119 .. code-block:: bash
121 $ west build -b nucleo_l552ze_q/stm32l552xx/ns samples/tfm_integration/tfm_ipc/
123 Example, for building non-secure configuration for STM32L562E-DK Discovery
125 .. code-block:: bash
127 $ west build -b stm32l562e_dk/stm32l562xx/ns samples/tfm_integration/tfm_ipc/
129 The script to initialize the device is available in the ``build/tfm`` folder:
131 - ``regression.sh``: Sets platform option bytes config and erase platform.
135 .. code-block:: bash
137 $ ./build/tfm/api_ns/regression.sh
141 Note that ``arm-none-eabi-gcc`` should be available in the PATH variable and that
143 (see https://www.st.com/en/development-tools/stm32cubeprog.html). If you are still having
150 Build Zephyr with a non-secure configuration:
152 .. code-block:: bash
154 $ west build -p -b lpcxpresso55s69_ns samples/tfm_integration/tfm_ipc/ --
156 Make sure your board is set up with :ref:`lpclink2-jlink-onboard-debug-probe`,
160 J-Link as follows:
162 .. code-block:: console
164 JLinkExe -device lpc55s69 -if swd -speed 2000 -autoconnect 1
165 J-Link>r
166 J-Link>erase
167 J-Link>loadfile build/zephyr/tfm_merged.bin
177 Build Zephyr with a non-secure configuration
178 (``-DBOARD=nrf5340dk/nrf5340/cpuapp/ns`` or ``-DBOARD=nrf9160dk/nrf9160/ns``).
180 Example, for nRF9160, using ``cmake`` and ``ninja``
182 .. code-block:: bash
185 rm -rf build
186 mkdir build && cd build
187 cmake -GNinja -DBOARD=nrf9160dk/nrf9160/ns ..
194 .. code-block:: bash
196 nrfjprog -f NRF91 --program tfm/bin/bl2.hex --sectorerase
198 Finally, flash the concatenated TF-M + Zephyr binary.
200 Example, for nRF9160, using ``cmake`` and ``ninja``
202 .. code-block:: bash
204 ninja flash
209 Build Zephyr with a non-secure configuration
210 (``-DBOARD=bl5340_dvk/nrf5340/cpuapp/ns``).
212 Example using ``cmake`` and ``ninja``
214 .. code-block:: bash
217 rm -rf build
218 mkdir build && cd build
219 cmake -GNinja -DBOARD=bl5340_dvk/nrf5340/cpuapp/ns ..
221 Flash the concatenated TF-M + Zephyr binary.
225 .. code-block:: bash
227 west flash --hex-file zephyr/tfm_merged.hex
232 .. code-block:: console
241 [INF] Beginning TF-M provisioning
245 Booting TF-M v2.0.0
250 *** Booting Zephyr OS build v3.6.0 ***
251 TF-M IPC on (.*)
257 .. _TF-M build instruction:
258 …https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/+/refs/heads/main/docs/building/tfm_bu…
260 .. _TF-M secure boot:
261 …https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/+/refs/heads/main/docs/design_docs/boo…