blob: 873a4166babfe15d4633d6fe394674b82f8d5d77 [file] [log] [blame]
Awadhy Mohammed71bd9372023-08-07 14:46:15 +01001########################
2TF-M Example Application
3########################
4
5This sub-directory provides a bare metal example NS application, demonstrating how to use the
6artifacts exported by TF-M build.
7
8The application outputs "Hello TF-M world" and uses a PSA service function to demonstrate
9that a NS application can be successfully run.
10
11*****************
12The Build Process
13*****************
14
151. Clone the TF-M repository at anywhere, assume the root directory is ``<TF-M Source Dir>``
16
172. Create a build folder, for example ``build``.
18
193. Build the TF-M with the following command:
20
21..code-block::bash
22
23 cmake -S <TF-M Source Dir> -B build/spe -DTFM_PLATFORM=arm/mps2/an521 -DTFM_PROFILE=profile_small
24 cmake --build build/spe -- install
25
264. The files necessary to build TF-M will appear in ``build/spe/api_ns``
27
285. Build this example application:
29
30..code-block::bash
31
32 cmake -S <path_to_this_example> -B build/nspe \
33 -DCONFIG_SPE_PATH=<absolute_path_to>/build/spe/api_ns
34 cmake --build build/nspe
35
36*******************
37Run the Application
38*******************
39The output binary for the application will be located in ``build/spe/bin`` and ``build/nspe``.
40The application can be run using the SSE-200 fast-model using FVP_MPS2_AEMv8M provided by Arm
41Development Studio.
42Add ``bl2.axf`` and ``tfm_s_ns_signed.bin`` to the symbol files in the Debug Configuration menu.
43
44*Copyright (c) 2023, Arm Limited. All rights reserved.*