blob: f1efa952c51fe2a741a97e02c4e05d585642addb [file] [log] [blame]
Per Åstrand79929ff2021-01-26 14:42:43 +01001#
2# Copyright (c) 2021 Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6# Licensed under the Apache License, Version 2.0 (the License); you may
7# not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an AS IS BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18
Kristofer Jonssonec451552021-06-04 18:02:59 +020019if (NOT ${ETHOSU_TARGET} STREQUAL "corstone-300")
20 return()
21endif()
22
Per Åstrand79929ff2021-01-26 14:42:43 +010023#############################################################################
24# Secure world
25#############################################################################
26
27set(TRUSTZONE_BUILD ON)
28set(TRUSTZONE_PARTITION_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/secure" CACHE FILEPATH "")
29
30set(SECURE_GATEWAY_LIB "${CMAKE_CURRENT_BINARY_DIR}/secure_gw.o")
31
32add_subdirectory(secure)
33
34add_subdirectory(nonsecure)
35
36add_dependencies(trustzone_nonsecure trustzone_secure)
37
38add_custom_target(trustzone)
39add_dependencies(trustzone trustzone_secure nonsecure_binary)
40
41ethosu_add_test(trustzone_secure
42 NAME trustzone
Kristofer Jonsson715c07b2021-02-25 09:49:34 +010043 COMMAND ${ETHOSU_COMMAND_DEFAULT} -- --data ${CMAKE_CURRENT_BINARY_DIR}/nonsecure/ns_bin@0x7c000)