blob: e516e2b29eddf93953584cc214c00ce4ccb55718 [file] [log] [blame]
Summer Qin153f3df2022-11-17 15:51:02 +08001*********
2eRPC Host
3*********
4
Xinyu Zhangcc99dc72023-05-05 10:35:11 +08005This host example is only tested on Linux machine with Musca-S1 and AN521 FVP.
Summer Qin153f3df2022-11-17 15:51:02 +08006
Xinyu Zhangcc99dc72023-05-05 10:35:11 +08007Example: UART Transportation on Musca-S1
Summer Qin153f3df2022-11-17 15:51:02 +08008========================================
9
10Build instructions on the target
11--------------------------------
12
13.. code-block:: bash
14
15 cd <TF-M base folder>
Xinyu Zhangcc99dc72023-05-05 10:35:11 +080016 cmake -G"Unix Makefiles" -S . -B cmake_build -DTFM_PLATFORM=musca_s1 \
17 -DCONFIG_TFM_ERPC_TEST_FRAMEWORK=ON -DTFM_PARTITION_CRYPTO=ON -DTFM_PARTITION_INTERNAL_TRUSTED_STORAGE=ON \
18 -DTFM_SPM_LOG_LEVEL=TFM_SPM_LOG_LEVEL_SILENCE -DTFM_PARTITION_LOG_LEVEL=TFM_PARTITION_LOG_LEVEL_SILENCE \
19 -DMCUBOOT_LOG_LEVEL=OFF ../
Summer Qin153f3df2022-11-17 15:51:02 +080020 cmake --build cmake_build/ -- install -j32
21
Xinyu Zhangcc99dc72023-05-05 10:35:11 +080022.. Note::
23 All the logs must be disabled to avoid interferences between logs and eRPC transportation as
24 they share the same UART device.
25 Otherwise, the RPC test framework may not work.
26 This might only happen on platforms using the same UART devices.
27
Summer Qin153f3df2022-11-17 15:51:02 +080028Build instructions on the host
29------------------------------
30
31.. code-block:: bash
32
33 cd <TF-M tests base folder>/erpc/host_example
Xinyu Zhangcc99dc72023-05-05 10:35:11 +080034 cmake -S . -B build -G "Unix Makefiles" -DTFM_INSTALL_PATH=<TF-M install folder> -DERPC_REPO_PATH=<eRPC base folder> \
35 -DERPC_TRANSPORT=UART -DPORT_NAME="/dev/ttyACM0"
Summer Qin153f3df2022-11-17 15:51:02 +080036 cmake --build build/
37
Xinyu Zhangcc99dc72023-05-05 10:35:11 +080038Run instructions
39----------------
Summer Qin153f3df2022-11-17 15:51:02 +080040
Xinyu Zhangcc99dc72023-05-05 10:35:11 +080041- Flash the image to the device and boot it up.
42- Start the host example
Summer Qin153f3df2022-11-17 15:51:02 +080043
Xinyu Zhangcc99dc72023-05-05 10:35:11 +080044 .. code-block:: bash
45
46 cd <TF-M tests base folder>/erpc/host_example
47 ./build/erpc_main
Summer Qin153f3df2022-11-17 15:51:02 +080048
49Example: TCP Transportation on AN521 FVP
50========================================
51
52Build instructions on the target
53--------------------------------
54
55.. code-block:: bash
56
57 cd <TF-M base folder>
Xinyu Zhangcc99dc72023-05-05 10:35:11 +080058 cmake -G"Unix Makefiles" -S . -B cmake_build -DTFM_PLATFORM=an521 \
59 -DCONFIG_TFM_ERPC_TEST_FRAMEWORK=ON -DTFM_PARTITION_CRYPTO=ON -DTFM_PARTITION_INTERNAL_TRUSTED_STORAGE=ON ../
Summer Qin153f3df2022-11-17 15:51:02 +080060 cmake --build cmake_build/ -- install -j32
61
62Build instructions on the host
63------------------------------
64
65.. code-block:: bash
66
67 cd <TF-M tests base folder>/erpc/host_example
Xinyu Zhangcc99dc72023-05-05 10:35:11 +080068 cmake -S . -B build -G "Unix Makefiles" -DTFM_INSTALL_PATH=<TF-M install folder> -DERPC_REPO_PATH=<eRPC base folder> \
69 -DERPC_TRANSPORT=TCP -DERPC_HOST="0.0.0.0" -DERPC_PORT=5001
Summer Qin153f3df2022-11-17 15:51:02 +080070 cmake --build build/
71
Xinyu Zhangcc99dc72023-05-05 10:35:11 +080072Run instructions
73----------------
Summer Qin153f3df2022-11-17 15:51:02 +080074
75Start the AN521 FVP:
76
77.. code-block:: bash
78
79 <DS_PATH>/sw/models/bin/FVP_MPS2_AEMv8M \
80 --parameter fvp_mps2.platform_type=2 \
81 --parameter cpu0.baseline=0 \
82 --parameter cpu0.INITVTOR_S=0x10000000 \
83 --parameter cpu0.semihosting-enable=0 \
84 --parameter fvp_mps2.DISABLE_GATING=0 \
85 --parameter fvp_mps2.telnetterminal0.start_telnet=1 \
86 --parameter fvp_mps2.telnetterminal1.start_telnet=0 \
87 --parameter fvp_mps2.telnetterminal2.start_telnet=0 \
88 --parameter fvp_mps2.telnetterminal0.quiet=0 \
89 --parameter fvp_mps2.telnetterminal1.quiet=1 \
90 --parameter fvp_mps2.telnetterminal2.quiet=1 \
91 --parameter fvp_mps2.UART0.out_file=/dev/stdout \
92 --parameter fvp_mps2.UART0.unbuffered_output=1 \
93 --parameter fvp_mps2.telnetterminal1.mode=raw \
94 --parameter fvp_mps2.UART1.unbuffered_output=1 \
95 --parameter fvp_mps2.mps2_visualisation.disable-visualisation=1 \
96 --application cpu0=<APPLICATION> \
97 --data cpu0=<DATA>@0x10080000 \
98 -M 1
99
Xinyu Zhangcc99dc72023-05-05 10:35:11 +0800100Start the host example
101
Summer Qin153f3df2022-11-17 15:51:02 +0800102.. code-block:: bash
103
104 cd <TF-M tests base folder>/erpc/host_example
105 ./build/erpc_main
106
107--------------
108
109*Copyright (c) 2023, Arm Limited. All rights reserved.*