Buildsystem restructuring

- Allow linker file to be overriden
- Disable Trustzone build for other targets than Corstone-300
- Make toolchain TARGET_CPU variable cached

Change-Id: I98a15e1080e4bf49e029578888b1e4ce362bbab7
diff --git a/targets/common/CMakeLists.txt b/targets/common/CMakeLists.txt
index f3382f3..3e222be 100644
--- a/targets/common/CMakeLists.txt
+++ b/targets/common/CMakeLists.txt
@@ -41,6 +41,8 @@
 # ethosu_target_common     # Common for all targets
 ###############################################################################
 
+option(CPU_CACHE_ENABLE "Enable CPU instruction- and data cache" OFF)
+
 # Common
 add_library(ethosu_target_common INTERFACE)
 target_include_directories(ethosu_target_common INTERFACE include)
@@ -49,6 +51,11 @@
 add_library(ethosu_target_link INTERFACE)
 target_link_libraries(ethosu_target_link INTERFACE ethosu_target_common)
 
+# Configuring caches
+if (CPU_CACHE_ENABLE)
+    target_compile_definitions(ethosu_target_link INTERFACE CPU_CACHE_ENABLE)
+endif()
+
 # Startup
 add_library(ethosu_target_startup INTERFACE)
 target_link_libraries(ethosu_target_startup INTERFACE ethosu_target_link)