Docs: Minor restructuring of examples' docs
Signed-off-by: Anton Komlev <anton.komlev@arm.com>
Change-Id: Iaa14071fd2b8278e73fc8d6a760b512887942340
diff --git a/docs/examples/corstone310_fvp_dma/clcd_example.rst b/docs/examples/corstone310_fvp_dma/clcd_example.rst
index ac8dc3e..80e6611 100644
--- a/docs/examples/corstone310_fvp_dma/clcd_example.rst
+++ b/docs/examples/corstone310_fvp_dma/clcd_example.rst
@@ -2,6 +2,12 @@
Non-Secure DMA350 example for FreeRTOS
######################################
+.. toctree::
+ :maxdepth: 1
+ :titlesonly:
+
+ DMA-350 Triggering interface <triggering_example>
+
FreeRTOS example to demonstrate the DMA-350 privileged and unprivileged APIs.
The privileged task demonstrates a way of using of command linking feature.
The unprivileged task demonstrates the usage of the unprivileged DMA API through
diff --git a/docs/examples/examples.rst b/docs/examples/examples.rst
index c494b10..5819ba7 100644
--- a/docs/examples/examples.rst
+++ b/docs/examples/examples.rst
@@ -1,8 +1,8 @@
The list and simple introduction of the examples in this folder.
-*******************
-corstone310_fvp_dma
-*******************
+********************
+DMA-350 for FreeRTOS
+********************
* DMA-350 Secure tests
* Non-secure DMA-350 examples for the Corstone-310 FVP platform
@@ -12,18 +12,8 @@
- Bence Balogh `<bence.balogh@arm.com> <bence.balogh@arm.com>`_
- Mark Horvath `<mark.horvath@arm.com> <mark.horvath@arm.com>`_
-*************************
-extra_test_suites_example
-*************************
-
-An example and template of out-of-tree build of extra regression test suites.
-
-**Maintainers**
-
-Jianliang Shen `<jianliang.shen@arm.com> <jianliang.shen@arm.com>`_
-
*****************
-example_partition
+Example Partition
*****************
A simple secure partition implementation.
@@ -32,9 +22,9 @@
Jianliang Shen `<jianliang.shen@arm.com> <jianliang.shen@arm.com>`_
-*********
-vad_an552
-*********
+************************
+Voice Activity Detection
+************************
Example application for the AN552 FPGA image, details can be found
`here </examples/vad_an552/readme.rst>`.
diff --git a/docs/examples/index.rst b/docs/examples/index.rst
index 7f447ef..526ea9f 100644
--- a/docs/examples/index.rst
+++ b/docs/examples/index.rst
@@ -4,11 +4,12 @@
.. toctree::
:maxdepth: 1
:titlesonly:
- :hidden:
- Non-Secure DMA350 Example for FreeRTOS <corstone310_fvp_dma/clcd_example>
- DMA350 Triggering Interface Example <corstone310_fvp_dma/triggering_example>
- TF-M Example Partition <example_partition>
- Threat Models <vad_an552/index>
+ DMA-350 for FreeRTOS <corstone310_fvp_dma/clcd_example>
+ TF-M Partition Example <example_partition>
+ Voice Activity Detection <vad_an552/vad_an552>
+ TF-M Application <tf-m-example-ns-app/readme.rst>
+
+---------------------------
.. include:: examples.rst
diff --git a/docs/examples/tf-m-example-ns-app/readme.rst b/docs/examples/tf-m-example-ns-app/readme.rst
new file mode 100644
index 0000000..7b02ba0
--- /dev/null
+++ b/docs/examples/tf-m-example-ns-app/readme.rst
@@ -0,0 +1,66 @@
+########################
+TF-M Example Application
+########################
+
+This **tf-m-example-ns-app** directory provides a bare metal example NS application, demonstrating how to use the
+artifacts exported by TF-M build.
+
+The application outputs "Hello TF-M world" and uses a PSA service function to demonstrate
+that a NS application can be successfully run.
+
+*****************
+The Build Process
+*****************
+
+1. Clone the TF-M repository at anywhere, assume the root directory is ``<TF-M Source Dir>``
+
+2. Build the TF-M with the following command:
+
+.. code-block:: bash
+
+ cmake -S <TF-M Source Dir> -B build/spe -DTFM_PLATFORM=arm/mps2/an521 -DTFM_PROFILE=profile_small
+ cmake --build build/spe -- install
+
+3. The files necessary to build TF-M will appear in ``build/spe/api_ns``.
+ The most important elements are:
+
+ - Bootloader: ``/bin/bl2.*``
+ - Secure (S) side binary image: ``/bin/tfm_s.*``
+ - PSA API for Non-Secure application ``/interface/*``
+
+4. Build this example TF-M application:
+
+.. code-block:: bash
+
+ cmake -S <path_to_this_example> -B build/nspe -DCONFIG_SPE_PATH=<absolute_path_to>/build/spe/api_ns
+ cmake --build build/nspe
+
+5. In output you will get:
+
+ - Non-secure (NS) application in ``build/nspe/bin/tfm_ns.*``
+ - Combined S + NS bianry ``build/nspe/bin/tfm_s_ns.bin``
+ - Combined S + NS and signed bianry ``build/nspe/bin/tfm_s_ns.bin``
+
+*******************
+Run the Application
+*******************
+The application binary shall be loaded and launched on address ``0x10080000``.
+The application can be run using the SSE-200 fast-model using FVP_MPS2_AEMv8M provided by Arm
+Development Studio.
+Add ``bl2.axf`` and ``tfm_s_ns_signed.bin`` to the symbol files in the Debug Configuration menu.
+The following output you shall find in a serial terminal:
+
+.. code-block:: console
+
+ Non-Secure system starting...
+ Hello TF-M world
+ PSA Framework Version = 1.1
+ Testing psa get random number...
+ 1: psa_generate_random() = 254
+ 2: psa_generate_random() = 214
+ 3: psa_generate_random() = 129
+ 4: psa_generate_random() = 226
+ 5: psa_generate_random() = 102
+ End of TF-M example App
+
+*Copyright (c) 2023, Arm Limited. All rights reserved.*
diff --git a/docs/examples/vad_an552/index.rst b/docs/examples/vad_an552/index.rst
deleted file mode 100644
index 67dce36..0000000
--- a/docs/examples/vad_an552/index.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-Threat Models
-=============
-
-.. toctree::
- :maxdepth: 1
- :glob:
-
- *
-
---------------
-
-*Copyright (c) 2022, Arm Limited. All rights reserved.*
diff --git a/docs/examples/vad_an552/vad_an552.rst b/docs/examples/vad_an552/vad_an552.rst
index ee23426..943dceb 100644
--- a/docs/examples/vad_an552/vad_an552.rst
+++ b/docs/examples/vad_an552/vad_an552.rst
@@ -2,6 +2,11 @@
Voice Activity Detection demo application
#########################################
+.. toctree::
+ :maxdepth: 1
+
+ Threat Model <threat_model>
+
A demo application for the AN552 FPGA showcasing:
* secure partition using MVE to speed up algorithms