RPC: Add command line option support for RPC host
The RPC host program needs to be rebuilt whenever the transportation is changed.
This patch adds support for command-line options for RPC transportation so that the host app does not have to rebuild.
Follow README.rst on how to use it.
Signed-off-by: Jason Guo <jason.guo@arm.com>
Change-Id: I0acf3570cb0d0808caa4263b16749feaf7267865
diff --git a/erpc/host_example/README.rst b/erpc/host_example/README.rst
index e516e2b..3c59119 100644
--- a/erpc/host_example/README.rst
+++ b/erpc/host_example/README.rst
@@ -35,6 +35,10 @@
-DERPC_TRANSPORT=UART -DPORT_NAME="/dev/ttyACM0"
cmake --build build/
+.. Note::
+ The ``ERPC_TRANSPORT`` and ``PORT_NAME`` can be omitted and setting the transportation info
+ in command line is also supported. Follow `Run instructions`_ on how to use the command line.
+
Run instructions
----------------
@@ -46,6 +50,11 @@
cd <TF-M tests base folder>/erpc/host_example
./build/erpc_main
+ .. Note::
+ If ``ERPC_TRANSPORT`` and ``PORT_NAME`` are not set, then they should be set as arguments of
+ ``erpc_main``. Execute the following command to run eRPC program:
+ ./build/erpc_main --UART /dev/ttyACM0
+
Example: TCP Transportation on AN521 FVP
========================================
@@ -69,6 +78,11 @@
-DERPC_TRANSPORT=TCP -DERPC_HOST="0.0.0.0" -DERPC_PORT=5001
cmake --build build/
+.. Note::
+ The ``ERPC_TRANSPORT``, ``ERPC_HOST`` and ``ERPC_PORT`` can be omitted and setting the
+ transportation info in command line is also supported. Follow `Run instructions`_ on
+ how to use the command line.
+
Run instructions
----------------
@@ -104,6 +118,11 @@
cd <TF-M tests base folder>/erpc/host_example
./build/erpc_main
+.. Note::
+ If ``ERPC_TRANSPORT``, ``ERPC_HOST`` and ``ERPC_PORT`` are not set, then they should be set as
+ arguments of ``erpc_main``. Execute the following command to run eRPC program:
+ ./build/erpc_main --TCP 0.0.0.0 5001
+
--------------
*Copyright (c) 2023, Arm Limited. All rights reserved.*