aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPer Åstrand <per.astrand@arm.com>2020-11-27 19:47:58 +0100
committerPer Astrand <per.astrand@arm.com>2021-01-12 14:47:59 +0000
commit19a22ae956106af50bab9ab85efe9d488bbaff87 (patch)
treed3aaa4dfc592cc6797d77c361a0935a639a48ff4 /CMakeLists.txt
parent97906ebb4687efee3678f2cbaf01ce881573d849 (diff)
downloadethos-u-core-software-19a22ae956106af50bab9ab85efe9d488bbaff87.tar.gz
Adapt cmsis build for secure/nonsecure worlds
Add external include path to get the device specific partion header file to setup SAU as needed by cmsis startup and make sure system isn't build if we are targeting nonsecure world. Change-Id: Ic9a9e380aa2bc41e6d1cd7f71c6713d033065c7a
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 564d4d0..537e9a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,15 @@ set_property(CACHE CORE_SOFTWARE_ACCELERATOR PROPERTY STRINGS CPU CMSIS-NN NPU)
set(CORE_SOFTWARE_RTOS "None" CACHE STRING "Select RTOS to include. (None, MbedOS, FreeRTOS, Zephyr)")
string(TOLOWER ${CORE_SOFTWARE_RTOS} CORE_SOFTWARE_RTOS_LOWER)
+# Set trustzone options
+set(TRUSTZONE_BUILD OFF CACHE BOOL "Enable TrustZone build")
+if (TRUSTZONE_BUILD)
+ set(TRUSTZONE_SIDE "secure" CACHE STRING "Select secure or nonsecure")
+ set_property(CACHE TRUSTZONE_SIDE PROPERTY STRINGS secure nonsecure)
+ set(TRUSTZONE_PARTITION_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" CACHE
+ FILEPATH "Path to CMSIS partion header for device")
+endif()
+
#
# Build
#
@@ -45,6 +54,7 @@ add_library(ethosu_core INTERFACE)
# Build CMSIS
include(cmsis.cmake)
+target_link_libraries(ethosu_core INTERFACE cmsis_core cmsis_device)
# Build core driver
if (CORE_SOFTWARE_ACCELERATOR STREQUAL "NPU")