aboutsummaryrefslogtreecommitdiff
path: root/targets/corstone-300
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2021-06-04 18:02:59 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-06-28 10:43:50 +0200
commitec451550f961ee940e2d9393bd6a52f4d2c25685 (patch)
tree01fe598a9af85b3f8ae38a353022c83a084f633c /targets/corstone-300
parentdabf6b5d835ff8bba36764d3db4dcc07f826dc3f (diff)
downloadethos-u-core-platform-ec451550f961ee940e2d9393bd6a52f4d2c25685.tar.gz
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
Diffstat (limited to 'targets/corstone-300')
-rw-r--r--targets/corstone-300/CMakeLists.txt19
1 files changed, 6 insertions, 13 deletions
diff --git a/targets/corstone-300/CMakeLists.txt b/targets/corstone-300/CMakeLists.txt
index 85fe944..7ae4d04 100644
--- a/targets/corstone-300/CMakeLists.txt
+++ b/targets/corstone-300/CMakeLists.txt
@@ -20,15 +20,13 @@
# Default parameters
#############################################################################
-set(TARGET_CPU "cortex-m55")
+set(TARGET_CPU "cortex-m55" CACHE INTERNAL "")
if (NOT CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/toolchain/armclang.cmake")
endif()
-set(ETHOSU_COMMAND_DEFAULT python3 ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/run_ctest.py -t corstone-300)
-
-option(CPU_CACHE_ENABLE "Enable CPU instruction- and data cache" OFF)
+set(ETHOSU_COMMAND_DEFAULT python3 ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/run_ctest.py -t corstone-300 CACHE INTERNAL "Default test command")
#############################################################################
# Project
@@ -44,8 +42,6 @@ include(CTest)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/helpers.cmake)
-set(SCRIPTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts)
-
#############################################################################
# Corstone-300
#############################################################################
@@ -58,6 +54,7 @@ set(TRUSTZONE_BUILD ON)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../common target)
+set(ETHOSU_TARGET_NPU_CONFIG "ethos-u55-128" CACHE STRING "NPU configuration")
set(ETHOSU_TARGET_NPU_COUNT 1 CACHE INTERNAL "Number of NPUs")
set(ETHOSU_TARGET_NPU_TA_COUNT 2 CACHE INTERNAL "Number of timing adapters per NPU")
@@ -65,14 +62,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
+set(LINK_FILE platform CACHE STRING "Link file")
+
ethosu_target_link_options(ethosu_target_link INTERFACE
- LINK_FILE platform
+ LINK_FILE ${LINK_FILE}
ENTRY Reset_Handler)
# Add drivers
@@ -91,4 +85,3 @@ target_link_libraries(ethosu_target_startup INTERFACE ethosu_core_driver timing_
# Add all applications
add_subdirectory(../../applications applications)
-