blob: e3888296aca397a41e810a1eaec1fab13dd2642e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
#-------------------------------------------------------------------------------
# Copyright (c) 2020, Arm Limited. All rights reserved.
# Copyright (c) 2020, Nordic Semiconductor ASA.
#
# SPDX-License-Identifier: BSD-3-Clause
#
#-------------------------------------------------------------------------------
cmake_policy(SET CMP0076 NEW)
set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
add_subdirectory(../core nrf_common)
#========================= Platform common defs ===============================#
# Specify the location of platform specific build dependencies.
target_sources(tfm_s
PRIVATE
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/gcc/startup_nrf5340_s.S>
)
if(NS)
target_sources(tfm_ns
PRIVATE
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/gcc/startup_nrf5340_ns.S>
)
endif()
if(BL2)
target_sources(bl2
PRIVATE
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/gcc/startup_nrf5340_bl2.S>
)
endif()
#========================= Platform Secure ====================================#
target_include_directories(platform_s
PUBLIC
.
)
target_sources(platform_s
PRIVATE
target_cfg.c
../core/nrfx/mdk/system_nrf5340_application.c
$<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/services/src/tfm_platform_system.c>
)
target_compile_definitions(platform_s
PUBLIC
NRF5340_XXAA_APPLICATION
)
#========================= Platform Non-Secure ================================#
target_include_directories(platform_ns
PUBLIC
.
)
target_sources(platform_ns
PRIVATE
../core/nrfx/mdk/system_nrf5340_application.c
)
target_compile_definitions(platform_ns
PUBLIC
NRF5340_XXAA_APPLICATION
NRF_TRUSTZONE_NONSECURE
DOMAIN_NS=1
)
#========================= Platform BL2 =======================================#
if(BL2)
target_include_directories(platform_bl2
PRIVATE
.
)
target_sources(platform_bl2
PRIVATE
../core/nrfx/mdk/system_nrf5340_application.c
)
target_compile_definitions(platform_bl2
PUBLIC
NRF5340_XXAA_APPLICATION
)
endif()
|