blob: 35a0dc459ef3526673f563b4d65f92749681b7e6 [file] [log] [blame]
#-------------------------------------------------------------------------------
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
#
#-------------------------------------------------------------------------------
if (NOT TFM_PARTITION_RUNTIME_PROVISIONING)
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_runtime_provisioning STATIC)
target_sources(tfm_psa_rot_partition_runtime_provisioning
PRIVATE
runtime_provisioning.c
)
# Add the source files generated by parse tools when building.
# The intermedia file defines the partition stack.
target_sources(tfm_psa_rot_partition_runtime_provisioning
PRIVATE
${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/runtime_provisioning/auto_generated/intermedia_runtime_provisioning.c
)
# The load info file includes the static data of the partition.
target_sources(tfm_partitions
INTERFACE
${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/runtime_provisioning/auto_generated/load_info_runtime_provisioning.c
)
target_include_directories(tfm_psa_rot_partition_runtime_provisioning
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC
${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/runtime_provisioning
)
target_link_libraries(tfm_psa_rot_partition_runtime_provisioning
PRIVATE
tfm_sprt
runtime_provisioning_hal
platform_s
)
############################ Partition Defs ####################################
target_link_libraries(tfm_partitions
INTERFACE
tfm_psa_rot_partition_runtime_provisioning
)
target_compile_definitions(tfm_config
INTERFACE
TFM_PARTITION_RUNTIME_PROVISIONING
)