1#
2# Copyright (c) 2021 Nordic Semiconductor ASA
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
7cmake_minimum_required(VERSION 3.20.0)
8
9find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
10
11get_target_property(TFM_BINARY_DIR tfm TFM_BINARY_DIR)
12configure_file(
13  ${CMAKE_CURRENT_LIST_DIR}/dummy_partition/tfm_manifest_list.yaml.in
14  ${CMAKE_CURRENT_BINARY_DIR}/dummy_partition/tfm_manifest_list.yaml
15)
16
17set_property(TARGET zephyr_property_target
18  APPEND PROPERTY TFM_CMAKE_OPTIONS
19  -DTFM_EXTRA_MANIFEST_LIST_FILES=${CMAKE_CURRENT_BINARY_DIR}/dummy_partition/tfm_manifest_list.yaml
20  -DTFM_EXTRA_PARTITION_PATHS=${CMAKE_CURRENT_LIST_DIR}/dummy_partition
21)
22
23project(tfm_secure_partition)
24
25target_sources(app PRIVATE
26  src/main.c
27  src/dummy_partition.c
28)
29
30target_include_directories(app PRIVATE
31  $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/interface/include
32)
33
34target_compile_definitions(app
35    PRIVATE TFM_PARTITION_DUMMY_PARTITION
36)
37