RPC: Add the dedicated eRPC config file in test repo
Change-Id: I98236b2af8fd850c705c182ba0768feab94b13b1
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index cdf60d5..22c0d1c 100755
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -266,6 +266,7 @@
.
$<$<BOOL:${CONFIG_TFM_ERPC_TEST_FRAMEWORK}>:${ERPC_DIR}/server>
$<$<BOOL:${CONFIG_TFM_ERPC_TEST_FRAMEWORK}>:${ERPC_REPO_PATH}/erpc_c/transports>
+ $<$<BOOL:${CONFIG_TFM_ERPC_TEST_FRAMEWORK}>:${ERPC_DIR}/platform/${TFM_PLATFORM}>
)
target_link_libraries(tfm_test_app
diff --git a/docs/tfm_erpc_test_framework.rst b/docs/tfm_erpc_test_framework.rst
index 5fa33ee..146e12e 100644
--- a/docs/tfm_erpc_test_framework.rst
+++ b/docs/tfm_erpc_test_framework.rst
@@ -140,13 +140,18 @@
When the eRPC test framework is enabled, the ``CONFIG_ENABLE_NS_UART_TX_RX_CONTROL`` will be enabled
automatically.
-Secondly, platforms need to specify the UART port and driver for eRPC transportation config via
-``target_cfg.h``.
+Secondly, platforms need to create their folders under the ``erpc/platform`` and then create the
+``config_erpc_target.h`` to specify the UART port drivers for eRPC transportation.
.. code-block::
#define ERPC_UART Driver_USART0
+.. note::
+
+ The folder structure in ``erpc/platform`` must be the same as the ``platform/ext/target`` of TF-M
+ repo.
+
It's recommended to use a different UART to the stdio UART.
If the same UART is used for both, then the TF-M logs (both SPM and Secure Partitions) must be
disabled.
diff --git a/erpc/platform/arm/mps2/an521/config_erpc_target.h b/erpc/platform/arm/mps2/an521/config_erpc_target.h
new file mode 100644
index 0000000..6a77103
--- /dev/null
+++ b/erpc/platform/arm/mps2/an521/config_erpc_target.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2023, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+/* Target side config file for running the eRPC test framework */
+
+#ifndef __CONFIG_ERPC_TARGET_H__
+#define __CONFIG_ERPC_TARGET_H__
+
+#define ERPC_UART Driver_USART1
+
+#endif /* __CONFIG_ERPC_TARGET_H__ */
diff --git a/erpc/platform/arm/musca_s1/config_erpc_target.h b/erpc/platform/arm/musca_s1/config_erpc_target.h
new file mode 100644
index 0000000..6a77103
--- /dev/null
+++ b/erpc/platform/arm/musca_s1/config_erpc_target.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2023, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+/* Target side config file for running the eRPC test framework */
+
+#ifndef __CONFIG_ERPC_TARGET_H__
+#define __CONFIG_ERPC_TARGET_H__
+
+#define ERPC_UART Driver_USART1
+
+#endif /* __CONFIG_ERPC_TARGET_H__ */