aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdison Ai <edison.ai@arm.com>2018-07-17 16:04:14 +0800
committerEdison Ai <edison.ai@arm.com>2018-12-17 19:54:48 +0800
commitec109cde7836e003965dbbbd64bf534d9e90f6cc (patch)
tree7f6ab8f51db06c5776b1aca070dce7135887c2db
parent87da25137b68f31deea4117b8ea0579f05fc987d (diff)
downloadtrusted-firmware-m-ec109cde7836e003965dbbbd64bf534d9e90f6cc.tar.gz
Core: Add config file for IPC
Add ConfigCoreIPC.cmake file for enabling IPC function, TFM_PSA_API and CORE_TEST_IPC depend on it. Change-Id: I6bcadfc3d7a8184e4c55aaf56e2958520be5a94a Signed-off-by: Edison Ai <edison.ai@arm.com>
-rw-r--r--CommonConfig.cmake12
-rw-r--r--ConfigCoreIPC.cmake49
2 files changed, 60 insertions, 1 deletions
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 858126a924..a33eb71b03 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -103,8 +103,9 @@ set (TFM_PARTITION_TEST_SECURE_SERVICES OFF)
set (SERVICES_TEST_ENABLED OFF)
set (TEST_FRAMEWORK_S OFF)
set (TEST_FRAMEWORK_NS OFF)
-set (TFM_PSA_API ON)
+set (TFM_PSA_API OFF)
set (TFM_LEGACY_API ON)
+set (CORE_TEST_IPC OFF)
if(${TARGET_PLATFORM} STREQUAL "AN521" OR ${TARGET_PLATFORM} STREQUAL "AN519")
set (REFERENCE_PLATFORM ON)
@@ -117,6 +118,11 @@ if (REGRESSION)
set(SERVICES_TEST_ENABLED ON)
endif()
+if (CORE_IPC)
+ set(TFM_PSA_API ON)
+ set(CORE_TEST_IPC ON)
+endif()
+
if (TFM_PSA_API)
add_definitions(-DTFM_PSA_API)
endif()
@@ -152,6 +158,10 @@ if (CORE_TEST_POSITIVE)
set(TFM_PARTITION_TEST_CORE ON)
endif()
+if (CORE_TEST_IPC)
+ add_definitions(-DCORE_TEST_IPC)
+endif()
+
if (SERVICE_TEST_S)
add_definitions(-DSERVICES_TEST_S)
add_definitions(-DTFM_PARTITION_TEST_SECURE_SERVICES)
diff --git a/ConfigCoreIPC.cmake b/ConfigCoreIPC.cmake
new file mode 100644
index 0000000000..c24d1b3575
--- /dev/null
+++ b/ConfigCoreIPC.cmake
@@ -0,0 +1,49 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2018, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+#This file holds information of a specific build configuration of this project.
+
+#Include board specific config (CPU, etc...), select platform specific build
+#system settings file
+if(NOT DEFINED TARGET_PLATFORM)
+ message(FATAL_ERROR "ERROR: TARGET_PLATFORM is not set in command line")
+elseif(${TARGET_PLATFORM} STREQUAL "AN521")
+ set(PLATFORM_CMAKE_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/ext/Mps2AN521.cmake")
+elseif(${TARGET_PLATFORM} STREQUAL "AN519")
+ set(PLATFORM_CMAKE_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/ext/Mps2AN519.cmake")
+elseif(${TARGET_PLATFORM} STREQUAL "MUSCA_A")
+ set(PLATFORM_CMAKE_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/ext/musca_a.cmake")
+elseif(${TARGET_PLATFORM} STREQUAL "MUSCA_B1")
+ set(PLATFORM_CMAKE_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/ext/musca_b1.cmake")
+else()
+ message(FATAL_ERROR "ERROR: Target \"${TARGET_PLATFORM}\" is not supported.")
+endif()
+
+##These variables select how the projects are built. Each project will set
+#various project specific settings (e.g. what files to build, macro
+#definitions) based on these.
+set (REGRESSION True)
+set (CORE_TEST False)
+set (CORE_IPC True)
+
+# TF-M isolation level: 1..3
+set (TFM_LVL 1)
+
+#BL2 bootloader(MCUBoot) related settings
+if(NOT DEFINED BL2)
+ set(BL2 True)
+endif()
+
+if(NOT DEFINED MCUBOOT_NO_SWAP)
+ set(MCUBOOT_NO_SWAP False)
+endif()
+
+if(NOT DEFINED MCUBOOT_RAM_LOADING)
+ set(MCUBOOT_RAM_LOADING False)
+endif()
+
+include ("${CMAKE_CURRENT_LIST_DIR}/CommonConfig.cmake")