blob: 131b8c6a539a9031d26c846da21f5072e581739a [file] [log] [blame]
#-------------------------------------------------------------------------------
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
#
#-------------------------------------------------------------------------------
if (NOT TFM_PARTITION_SCMI_COMMS)
return()
endif()
cmake_minimum_required(VERSION 3.21)
cmake_policy(SET CMP0079 NEW)
# The name of the target is required to be of the pattern
# tfm_app_rot_partition_x or tfm_psa_rot_partition_x, as it affects how the
# linker script will lay the partition in memory.
add_library(tfm_psa_rot_partition_scmi_comms STATIC)
target_sources(tfm_psa_rot_partition_scmi_comms
PRIVATE
scmi_comms.c
)
# Add the source files generated by parse tools when building.
# The intermedia file defines the partition stack.
target_sources(tfm_psa_rot_partition_scmi_comms
PRIVATE
${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/scmi/auto_generated/intermedia_scmi_comms.c
)
# The load info file includes the static data of the partition.
target_sources(tfm_partitions
INTERFACE
${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/scmi/auto_generated/load_info_scmi_comms.c
)
target_include_directories(tfm_psa_rot_partition_scmi_comms
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC
${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/scmi
)
target_link_libraries(tfm_psa_rot_partition_scmi_comms
PRIVATE
tfm_sprt
$<$<BOOL:${TEST_S_SCMI_COMMS}>:scmi_test_hal>
$<$<NOT:$<BOOL:${TEST_S_SCMI_COMMS}>>:scmi_hal>
platform_s
)
############################ Partition Defs ####################################
target_link_libraries(tfm_partitions
INTERFACE
tfm_psa_rot_partition_scmi_comms
)
target_compile_definitions(tfm_config
INTERFACE
TFM_PARTITION_SCMI_COMMS
)