blob: 5a99129df9a3ef1d1119a36914f7f5a6b38dd97b [file] [log] [blame]
Per Åstrand79929ff2021-01-26 14:42:43 +01001#
Kristofer Jonssonf7edeb72022-01-17 09:40:09 +01002# Copyright (c) 2021-2022 Arm Limited. All rights reserved.
Per Åstrand79929ff2021-01-26 14:42:43 +01003#
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 Jonssonf7edeb72022-01-17 09:40:09 +010019if (NOT ${ETHOSU_TARGET} STREQUAL "corstone-300" OR NOT TARGET ethosu_core_driver OR NOT ETHOSU_TARGET_NPU_CONFIG STREQUAL "ethos-u55-128")
Kristofer Jonssonec451552021-06-04 18:02:59 +020020 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)