RPC: Update the host example document
Change-Id: I33d8fc1ca7d91c126f17be0c7f49ddbebbbc4d93
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/erpc/host_example/README.rst b/erpc/host_example/README.rst
index d0e25f1..e516e2b 100644
--- a/erpc/host_example/README.rst
+++ b/erpc/host_example/README.rst
@@ -2,9 +2,9 @@
eRPC Host
*********
-This host example is only tested for Linux.
+This host example is only tested on Linux machine with Musca-S1 and AN521 FVP.
-Example: UART Transportation on Musca_S1
+Example: UART Transportation on Musca-S1
========================================
Build instructions on the target
@@ -13,25 +13,38 @@
.. code-block:: bash
cd <TF-M base folder>
- cmake -G"Unix Makefiles" -S . -B cmake_build -DTFM_PLATFORM=musca_s1 -DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=Debug -DCONFIG_TFM_ERPC_TEST_FRAMEWORK=ON -DTFM_PARTITION_CRYPTO=ON -DTFM_PARTITION_INTERNAL_TRUSTED_STORAGE=ON ../
+ cmake -G"Unix Makefiles" -S . -B cmake_build -DTFM_PLATFORM=musca_s1 \
+ -DCONFIG_TFM_ERPC_TEST_FRAMEWORK=ON -DTFM_PARTITION_CRYPTO=ON -DTFM_PARTITION_INTERNAL_TRUSTED_STORAGE=ON \
+ -DTFM_SPM_LOG_LEVEL=TFM_SPM_LOG_LEVEL_SILENCE -DTFM_PARTITION_LOG_LEVEL=TFM_PARTITION_LOG_LEVEL_SILENCE \
+ -DMCUBOOT_LOG_LEVEL=OFF ../
cmake --build cmake_build/ -- install -j32
+.. Note::
+ All the logs must be disabled to avoid interferences between logs and eRPC transportation as
+ they share the same UART device.
+ Otherwise, the RPC test framework may not work.
+ This might only happen on platforms using the same UART devices.
+
Build instructions on the host
------------------------------
.. code-block:: bash
cd <TF-M tests base folder>/erpc/host_example
- cmake -S . -B build -G "Unix Makefiles" -DTFM_INSTALL_PATH=<TF-M install folder> -DERPC_REPO_PATH=<eRPC base folder> -DERPC_TRANSPORT=UART -DPORT_NAME="/dev/ttyACM0"
+ cmake -S . -B build -G "Unix Makefiles" -DTFM_INSTALL_PATH=<TF-M install folder> -DERPC_REPO_PATH=<eRPC base folder> \
+ -DERPC_TRANSPORT=UART -DPORT_NAME="/dev/ttyACM0"
cmake --build build/
-Run instructions on the host
-----------------------------
+Run instructions
+----------------
-.. code-block:: bash
+- Flash the image to the device and boot it up.
+- Start the host example
- cd <TF-M tests base folder>/erpc/host_example
- ./build/erpc_main
+ .. code-block:: bash
+
+ cd <TF-M tests base folder>/erpc/host_example
+ ./build/erpc_main
Example: TCP Transportation on AN521 FVP
========================================
@@ -42,7 +55,8 @@
.. code-block:: bash
cd <TF-M base folder>
- cmake -G"Unix Makefiles" -S . -B cmake_build -DTFM_PLATFORM=an521 -DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=Debug -DCONFIG_TFM_ERPC_TEST_FRAMEWORK=ON -DTFM_PARTITION_CRYPTO=ON -DTFM_PARTITION_INTERNAL_TRUSTED_STORAGE=ON ../
+ cmake -G"Unix Makefiles" -S . -B cmake_build -DTFM_PLATFORM=an521 \
+ -DCONFIG_TFM_ERPC_TEST_FRAMEWORK=ON -DTFM_PARTITION_CRYPTO=ON -DTFM_PARTITION_INTERNAL_TRUSTED_STORAGE=ON ../
cmake --build cmake_build/ -- install -j32
Build instructions on the host
@@ -51,11 +65,12 @@
.. code-block:: bash
cd <TF-M tests base folder>/erpc/host_example
- cmake -S . -B build -G "Unix Makefiles" -DTFM_INSTALL_PATH=<TF-M install folder> -DERPC_REPO_PATH=<eRPC base folder> -DERPC_TRANSPORT=TCP -DERPC_HOST="0.0.0.0" -DERPC_PORT=5001
+ cmake -S . -B build -G "Unix Makefiles" -DTFM_INSTALL_PATH=<TF-M install folder> -DERPC_REPO_PATH=<eRPC base folder> \
+ -DERPC_TRANSPORT=TCP -DERPC_HOST="0.0.0.0" -DERPC_PORT=5001
cmake --build build/
-Run instructions on the host
-----------------------------
+Run instructions
+----------------
Start the AN521 FVP:
@@ -82,6 +97,8 @@
--data cpu0=<DATA>@0x10080000 \
-M 1
+Start the host example
+
.. code-block:: bash
cd <TF-M tests base folder>/erpc/host_example