diff options
author | David Hu <david.hu@arm.com> | 2019-05-21 13:54:50 +0800 |
---|---|---|
committer | David Hu <david.hu@arm.com> | 2019-09-20 11:33:48 +0800 |
commit | 857bfa5a84367a67ad02c9f4d8f3353d6a253acc (patch) | |
tree | 806b1fdad816c88eea406efd2934ad0c473a3f31 /secure_fw/CMakeLists.txt | |
parent | feae0f9ee8f57ae2711d380250987c5cb968fa62 (diff) | |
download | trusted-firmware-m-857bfa5a84367a67ad02c9f4d8f3353d6a253acc.tar.gz |
Twincpu: Support building multi-core TF-M in a single building execution
Enable building multi-core TF-M in a single building execution.
- Add MultiCore.cmake to support bulding in multi-core scenario.
Provide functions to platform specific cmake script to select
secure or non-secure configuration, including cpu type and
platform specific definitions.
- Add a building flag TFM_BUILD_IN_SPE to indicate whether current
building is for SPE or not.
- According to TFM_BUILD_IN_SPE flag value, select corresponding
configuration.
Change-Id: Ic1aca49190af9a9a5ec8ef1b855239a839fabe65
Signed-off-by: David Hu <david.hu@arm.com>
Diffstat (limited to 'secure_fw/CMakeLists.txt')
-rw-r--r-- | secure_fw/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/secure_fw/CMakeLists.txt b/secure_fw/CMakeLists.txt index 850f831e53..04b8f61fc5 100644 --- a/secure_fw/CMakeLists.txt +++ b/secure_fw/CMakeLists.txt @@ -7,6 +7,8 @@ cmake_minimum_required(VERSION 3.7) +set(TFM_BUILD_IN_SPE ON) + #Tell cmake where our modules can be found list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../cmake) @@ -88,6 +90,12 @@ embedded_target_include_directories(TARGET ${PROJECT_NAME} PATH ${TFM_ROOT_DIR} set(PROJECT_OBJ_LIB ${PROJECT_NAME}_obj_lib) add_library(${PROJECT_OBJ_LIB} OBJECT ${ALL_SRC_C} ${ALL_SRC_C_S} ${ALL_SRC_ASM_S}) +#Add platform specific definitions in SPE +if (DEFINED TFM_PLATFORM_SECURE_DEFS) + embedded_set_target_compile_defines(TARGET ${PROJECT_OBJ_LIB} LANGUAGE C DEFINES ${TFM_PLATFORM_SECURE_DEFS} APPEND) + embedded_set_target_compile_defines(TARGET ${PROJECT_OBJ_LIB} LANGUAGE ASM DEFINES ${TFM_PLATFORM_SECURE_DEFS} APPEND) +endif() + #Set common compiler flags config_setting_shared_compiler_flags(${PROJECT_OBJ_LIB}) |