Per Åstrand | 79929ff | 2021-01-26 14:42:43 +0100 | [diff] [blame] | 1 | # |
| 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 Jonsson | 15625f1 | 2021-11-24 14:16:34 +0100 | [diff] [blame] | 19 | if (NOT ${ETHOSU_TARGET} STREQUAL "corstone-300" OR NOT TARGET ethosu_core_driver) |
Kristofer Jonsson | ec45155 | 2021-06-04 18:02:59 +0200 | [diff] [blame] | 20 | return() |
| 21 | endif() |
| 22 | |
Per Åstrand | 79929ff | 2021-01-26 14:42:43 +0100 | [diff] [blame] | 23 | ############################################################################# |
| 24 | # Secure world |
| 25 | ############################################################################# |
| 26 | |
| 27 | set(TRUSTZONE_BUILD ON) |
| 28 | set(TRUSTZONE_PARTITION_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/secure" CACHE FILEPATH "") |
| 29 | |
| 30 | set(SECURE_GATEWAY_LIB "${CMAKE_CURRENT_BINARY_DIR}/secure_gw.o") |
| 31 | |
| 32 | add_subdirectory(secure) |
| 33 | |
| 34 | add_subdirectory(nonsecure) |
| 35 | |
| 36 | add_dependencies(trustzone_nonsecure trustzone_secure) |
| 37 | |
| 38 | add_custom_target(trustzone) |
| 39 | add_dependencies(trustzone trustzone_secure nonsecure_binary) |
| 40 | |
| 41 | ethosu_add_test(trustzone_secure |
| 42 | NAME trustzone |
Kristofer Jonsson | 715c07b | 2021-02-25 09:49:34 +0100 | [diff] [blame] | 43 | COMMAND ${ETHOSU_COMMAND_DEFAULT} -- --data ${CMAKE_CURRENT_BINARY_DIR}/nonsecure/ns_bin@0x7c000) |