aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRajasekaran Kalidoss <rajasekaran.kalidoss@arm.com>2024-04-24 12:55:29 +0200
committerRajasekaran Kalidoss <rajasekaran.kalidoss@arm.com>2024-05-13 15:48:09 +0200
commitf922fd1acb5064cd160e1395dc67a2cd5bb3cdfb (patch)
tree7752643f7843369beaf44b26eb73b4463496264a /CMakeLists.txt
parentdef786363c7d550faac6afbc0fe436fd06c059be (diff)
downloadethos-u-core-software-f922fd1acb5064cd160e1395dc67a2cd5bb3cdfb.tar.gz
Change CMSIS Device file paths for CMSIS 6
This patch adds support for building with CMSIS_6 in addition to CMSIS_5. A cmake flag(CMSIS_VER) with default value of 5 has been added. This can be overridden in the cmake command line. CMSIS Device component is no longer part of CMSIS_6 and is part of Cortex_DFP repo. This patch also has the file path changes required to include CMSIS Device from Cortex_DFP. Change-Id: I148ab6b384d725ca83e75ac08e15c58809f25ac1 Signed-off-by: Rajasekaran Kalidoss <rajasekaran.kalidoss@arm.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c13c954..75ffc97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,5 @@
#
-# SPDX-FileCopyrightText: Copyright 2019-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
-#
+# SPDX-FileCopyrightText: Copyright 2019-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the License); you may
@@ -26,8 +25,16 @@ project(core_software VERSION 0.0.1)
# Define build options
#
+SET(CMSIS_VER "5" CACHE STRING "CMSIS Version")
+
# Setup paths
-set(CMSIS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmsis" CACHE PATH "Path to CMSIS.")
+if (${CMSIS_VER} EQUAL 5)
+ set(CMSIS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmsis" CACHE PATH "Path to CMSIS.")
+elseif(${CMSIS_VER} EQUAL 6)
+ set(CMSIS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmsis_6" CACHE PATH "Path to CMSIS.")
+else()
+ message(FATAL_ERROR "CMSIS_VER '${CMSIS_VER}' not supported. Should be 5 or 6.")
+endif()
set(CMSIS_NN_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmsis-nn" CACHE PATH "Path to CMSIS-NN.")
set(CMSIS_VIEW_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmsis-view" CACHE PATH "Path to cmsis-view.")
set(CORE_DRIVER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/core_driver" CACHE PATH "Path to core driver.")