1#------------------------------------------------------------------------------- 2# Copyright (c) 2021-2022, Arm Limited. All rights reserved. 3# Copyright (c) 2021-2022 Cypress Semiconductor Corporation (an Infineon company) 4# or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 5# 6# SPDX-License-Identifier: BSD-3-Clause 7# 8#------------------------------------------------------------------------------- 9 10if (NOT TFM_PARTITION_NS_AGENT_MAILBOX) 11 return() 12endif() 13 14cmake_minimum_required(VERSION 3.15) 15cmake_policy(SET CMP0079 NEW) 16 17add_library(tfm_psa_rot_partition_ns_agent_mailbox STATIC) 18 19target_sources(tfm_psa_rot_partition_ns_agent_mailbox 20 PRIVATE 21 ${CMAKE_SOURCE_DIR}/secure_fw/spm/cmsis_psa/tfm_rpc.c 22 $<$<NOT:$<BOOL:${TFM_PLAT_SPECIFIC_MULTI_CORE_COMM}>>:${CMAKE_SOURCE_DIR}/secure_fw/spm/cmsis_psa/tfm_spe_mailbox.c> 23 ns_agent_mailbox.c 24 tfm_multi_core_mem_check.c 25) 26 27target_link_libraries(tfm_psa_rot_partition_ns_agent_mailbox 28 PRIVATE 29 platform_common_interface 30 tfm_spm 31 tfm_sprt 32 platform_s 33) 34 35# The generated sources 36target_sources(tfm_psa_rot_partition_ns_agent_mailbox 37 PRIVATE 38 ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/ns_agent_mailbox/auto_generated/intermedia_ns_agent_mailbox.c 39) 40target_sources(tfm_partitions 41 INTERFACE 42 ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/ns_agent_mailbox/auto_generated/load_info_ns_agent_mailbox.c 43) 44 45# Set include directory 46target_include_directories(tfm_psa_rot_partition_ns_agent_mailbox 47 PRIVATE 48 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> 49 PUBLIC 50 ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/ns_agent_mailbox 51) 52 53############################ Partition Defs #################################### 54 55target_link_libraries(tfm_partitions 56 INTERFACE 57 tfm_psa_rot_partition_ns_agent_mailbox 58) 59 60target_compile_definitions(tfm_partition_defs 61 INTERFACE 62 TFM_PARTITION_NS_AGENT_MAILBOX 63) 64