aboutsummaryrefslogtreecommitdiff
path: root/targets/corstone-300/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'targets/corstone-300/CMakeLists.txt')
-rw-r--r--targets/corstone-300/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/targets/corstone-300/CMakeLists.txt b/targets/corstone-300/CMakeLists.txt
index 538a978..e791cfd 100644
--- a/targets/corstone-300/CMakeLists.txt
+++ b/targets/corstone-300/CMakeLists.txt
@@ -28,6 +28,8 @@ endif()
set(ETHOSU_COMMAND_DEFAULT ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/run_ctest.py -t corstone-300)
+option(CPU_CACHE_ENABLE "Enable CPU instruction- and data cache" ON)
+
#############################################################################
# Project
#############################################################################
@@ -59,6 +61,11 @@ target_compile_definitions(ethosu_target_common INTERFACE
ETHOSU_NPU_TA_COUNT=${ETHOSU_TARGET_NPU_TA_COUNT}
ETHOSU_NPU_COUNT=${ETHOSU_TARGET_NPU_COUNT})
+if (CPU_CACHE_ENABLE)
+ target_compile_definitions(ethosu_target_common INTERFACE
+ CPU_CACHE_ENABLE)
+endif()
+
# Linker script
ethosu_target_link_options(ethosu_target_link INTERFACE
LINK_FILE platform
@@ -68,7 +75,8 @@ ethosu_target_link_options(ethosu_target_link INTERFACE
target_sources(ethosu_target_startup INTERFACE
retarget.c
uart.c
- target.cpp)
+ target.cpp
+ mpu.cpp)
target_compile_definitions(ethosu_core_driver PUBLIC ETHOSU)
target_link_libraries(ethosu_target_startup INTERFACE ethosu_core_driver timing_adapter)