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>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 858126a..a33eb71 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -103,8 +103,9 @@
 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 @@
 	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 @@
 	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 0000000..c24d1b3
--- /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")