Test: Add fetch eRPC remote library
Add fetch eRPC remote library.
eRPC is integrated with tf-m tests.
Signed-off-by: Summer Qin <summer.qin@arm.com>
Change-Id: Iad79d5169e3345b52deb79ea2855c29453297db2
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ecfd432..0f09d25 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -7,6 +7,8 @@
add_subdirectory(log)
+add_subdirectory(lib/ext)
+
if(NS)
add_subdirectory(app)
endif()
diff --git a/lib/ext/CMakeLists.txt b/lib/ext/CMakeLists.txt
new file mode 100644
index 0000000..eb53c97
--- /dev/null
+++ b/lib/ext/CMakeLists.txt
@@ -0,0 +1,10 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2023, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+if(CONFIG_TFM_ERPC_TEST_FRAMEWORK)
+ add_subdirectory(erpc)
+endif()
diff --git a/lib/ext/erpc/CMakeLists.txt b/lib/ext/erpc/CMakeLists.txt
new file mode 100644
index 0000000..66071f9
--- /dev/null
+++ b/lib/ext/erpc/CMakeLists.txt
@@ -0,0 +1,21 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2023, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+set(ERPC_REPO_PATH "DOWNLOAD" CACHE PATH "Path to eRPC repo (or DOWNLOAD to fetch automatically")
+set(ERPC_VERSION "1.9.1" CACHE STRING "The version of eRPC to use")
+
+fetch_remote_library(
+ LIB_NAME erpc
+ LIB_SOURCE_PATH_VAR ERPC_REPO_PATH
+ LIB_BASE_DIR "${CMAKE_BINARY_DIR}/lib/ext"
+ FETCH_CONTENT_ARGS
+ GIT_REPOSITORY https://github.com/EmbeddedRPC/erpc.git
+ GIT_TAG ${ERPC_VERSION}
+ GIT_SHALLOW TRUE
+ GIT_PROGRESS TRUE
+ GIT_SUBMODULES ""
+)