summaryrefslogtreecommitdiff
path: root/scripts/cmake/bare-metal-sources.cmake
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2021-11-23 17:19:52 +0000
committerKshitij Sisodia <kshitij.sisodia@arm.com>2021-11-23 17:19:52 +0000
commitb59ba684aef4bef16262a1825e787a55fc992f0d (patch)
tree389e667ef3132727386e0800c0a63d676693185f /scripts/cmake/bare-metal-sources.cmake
parent37926c819f77a6fe9e3ae913486ac6fc78bd2bd0 (diff)
downloadml-embedded-evaluation-kit-b59ba684aef4bef16262a1825e787a55fc992f0d.tar.gz
MLECO-1935: All common CMake user options consolidated.
For easier look up and maintenance, all common CMake user options have been consolidated in one CMake file. NOTE: the individual use case specific options are still within the correspoinding use case CMake files. Change-Id: Id887f7b2c763f4d3eb997d997cf466684d0089b6
Diffstat (limited to 'scripts/cmake/bare-metal-sources.cmake')
-rw-r--r--scripts/cmake/bare-metal-sources.cmake30
1 files changed, 4 insertions, 26 deletions
diff --git a/scripts/cmake/bare-metal-sources.cmake b/scripts/cmake/bare-metal-sources.cmake
index 98030d5..abca622 100644
--- a/scripts/cmake/bare-metal-sources.cmake
+++ b/scripts/cmake/bare-metal-sources.cmake
@@ -40,29 +40,9 @@ set(ETHOS_U_NPU_FLAG "-DARM_NPU=1")
if (ETHOS_U_NPU_ENABLED)
- USER_OPTION(ETHOS_U_NPU_ID "Arm Ethos-U NPU IP (U55 or U65)"
- "U55"
- STRING)
-
- if ((ETHOS_U_NPU_ID STREQUAL U55) OR (ETHOS_U_NPU_ID STREQUAL U65))
- if (ETHOS_U_NPU_ID STREQUAL U55)
- set(DEFAULT_NPU_MEM_MODE "Shared_Sram")
- set(DEFAULT_NPU_CONFIG_ID "H128")
- elseif(ETHOS_U_NPU_ID STREQUAL U65)
- set(DEFAULT_NPU_MEM_MODE "Dedicated_Sram")
- set(DEFAULT_NPU_CONFIG_ID "Y256")
- endif()
- else ()
- message(FATAL_ERROR "Non compatible Ethos-U NPU processor ${ETHOS_U_NPU_ID}")
- endif ()
-
- USER_OPTION(ETHOS_U_NPU_MEMORY_MODE "Specifies the memory mode used in the Vela command."
- "${DEFAULT_NPU_MEM_MODE}"
- STRING)
-
- USER_OPTION(ETHOS_U_NPU_CONFIG_ID "Specifies the configuration ID for the NPU."
- "${DEFAULT_NPU_CONFIG_ID}"
- STRING)
+ assert_defined(ETHOS_U_NPU_ID)
+ assert_defined(ETHOS_U_NPU_MEMORY_MODE)
+ assert_defined(ETHOS_U_NPU_CONFIG_ID)
if (ETHOS_U_NPU_MEMORY_MODE STREQUAL Sram_Only)
@@ -140,11 +120,9 @@ if (ETHOS_U_NPU_ENABLED)
else ()
set(DEFAULT_TA_CONFIG_FILE_PATH "${CMAKE_SCRIPTS_DIR}/timing_adapter/ta_config_u65_high_end.cmake")
endif ()
- USER_OPTION(TA_CONFIG_FILE "Path to the timing adapter configuration file"
- ${DEFAULT_TA_CONFIG_FILE_PATH}
- FILEPATH)
# must be included after target subsystem CMake file
+ assert_defined(TA_CONFIG_FILE)
include(${TA_CONFIG_FILE})
endif()