summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/cmsis-dsp.cmake15
-rw-r--r--scripts/cmake/common_user_options.cmake4
2 files changed, 12 insertions, 7 deletions
diff --git a/scripts/cmake/cmsis-dsp.cmake b/scripts/cmake/cmsis-dsp.cmake
index f22d5ef..fb2c43a 100644
--- a/scripts/cmake/cmsis-dsp.cmake
+++ b/scripts/cmake/cmsis-dsp.cmake
@@ -18,17 +18,18 @@
# CMSIS-DSP library CMake helper script.
# Check if CMSIS sources have been defined
+if (NOT DEFINED CMSIS_DSP_SRC_PATH)
+ message(FATAL_ERROR "CMSIS-DSP path should be defined for CMSIS-DSP library to be built")
+endif()
if (NOT DEFINED CMSIS_SRC_PATH)
- message(FATAL_ERROR "CMSIS path should be defined for CMSIS-DSP library to be built")
+ message(FATAL_ERROR "CMSIS-5 path should be defined to include CMSIS-CORE")
endif()
# 3. Form a list of all the sources we need in CSMS-DSP library
-set(CMSIS_DSP_PATH_SUFFIX "CMSIS/DSP")
-set(CMSIS_CORE_PATH_SUFFIX "CMSIS/Core")
-set(CMSIS_DSP_SRC_DIR "${CMSIS_SRC_PATH}/${CMSIS_DSP_PATH_SUFFIX}/Source")
-set(CMSIS_DSP_INC_DIR "${CMSIS_SRC_PATH}/${CMSIS_DSP_PATH_SUFFIX}/Include")
-set(CMSIS_DSP_PRI_INC_DIR "${CMSIS_SRC_PATH}/${CMSIS_DSP_PATH_SUFFIX}/PrivateInclude")
-set(CMSIS_CORE_INC_DIR "${CMSIS_SRC_PATH}/${CMSIS_CORE_PATH_SUFFIX}/Include")
+set(CMSIS_DSP_SRC_DIR "${CMSIS_DSP_SRC_PATH}/Source")
+set(CMSIS_DSP_INC_DIR "${CMSIS_DSP_SRC_PATH}/Include")
+set(CMSIS_DSP_PRI_INC_DIR "${CMSIS_DSP_SRC_PATH}/PrivateInclude")
+set(CMSIS_CORE_INC_DIR "${CMSIS_SRC_PATH}/CMSIS/Core/Include")
file(GLOB_RECURSE
CMSIS_DSP_SRC
diff --git a/scripts/cmake/common_user_options.cmake b/scripts/cmake/common_user_options.cmake
index 7981068..36426a8 100644
--- a/scripts/cmake/common_user_options.cmake
+++ b/scripts/cmake/common_user_options.cmake
@@ -83,6 +83,10 @@ if (NOT TARGET_PLATFORM STREQUAL native)
"Path to CMSIS-5 sources"
"${DEPENDENCY_ROOT_DIR}/cmsis"
PATH)
+ USER_OPTION(CMSIS_DSP_SRC_PATH
+ "Path to CMSIS-5 DSP sources"
+ "${DEPENDENCY_ROOT_DIR}/cmsis-dsp"
+ PATH)
# If we need NPU libraries:
if (ETHOS_U_NPU_ENABLED)