diff --git a/modules/cmsis/CMakeLists.txt b/modules/cmsis/CMakeLists.txt index 59a8307a8fb..d23bcaea979 100644 --- a/modules/cmsis/CMakeLists.txt +++ b/modules/cmsis/CMakeLists.txt @@ -3,6 +3,6 @@ add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} cmsis) -if(CONFIG_CPU_CORTEX_M OR CONFIG_CPU_AARCH32_CORTEX_A OR CONFIG_CPU_AARCH32_CORTEX_R) +if(CONFIG_CPU_AARCH32_CORTEX_A OR CONFIG_CPU_AARCH32_CORTEX_R) zephyr_include_directories(.) endif() diff --git a/modules/cmsis/Kconfig b/modules/cmsis/Kconfig index aba63d35e1a..9cc5ee79630 100644 --- a/modules/cmsis/Kconfig +++ b/modules/cmsis/Kconfig @@ -8,7 +8,6 @@ config HAS_CMSIS_CORE bool select HAS_CMSIS_CORE_A if CPU_AARCH32_CORTEX_A select HAS_CMSIS_CORE_R if CPU_AARCH32_CORTEX_R - select HAS_CMSIS_CORE_M if CPU_CORTEX_M if HAS_CMSIS_CORE @@ -18,19 +17,4 @@ config HAS_CMSIS_CORE_A config HAS_CMSIS_CORE_R bool -config HAS_CMSIS_CORE_M - bool - -config CMSIS_M_CHECK_DEVICE_DEFINES - bool "Check device defines" - default n - depends on HAS_CMSIS_CORE_M - help - This options enables the validation of CMSIS configuration flags. - -config CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK - bool - help - Enable this option if CMSIS SystemCoreClock symbols is available. - endif diff --git a/modules/cmsis/cmsis_core.h b/modules/cmsis/cmsis_core.h index 4f57c682138..b85533b56ae 100644 --- a/modules/cmsis/cmsis_core.h +++ b/modules/cmsis/cmsis_core.h @@ -6,9 +6,7 @@ #ifndef ZEPHYR_MODULES_CMSIS_CMSIS_H_ #define ZEPHYR_MODULES_CMSIS_CMSIS_H_ -#if defined(CONFIG_CPU_CORTEX_M) -#include "cmsis_core_m.h" -#elif defined(CONFIG_CPU_AARCH32_CORTEX_A) || defined(CONFIG_CPU_AARCH32_CORTEX_R) +#if defined(CONFIG_CPU_AARCH32_CORTEX_A) || defined(CONFIG_CPU_AARCH32_CORTEX_R) #include "cmsis_core_a_r.h" #endif diff --git a/modules/cmsis_6/CMakeLists.txt b/modules/cmsis_6/CMakeLists.txt new file mode 100644 index 00000000000..1f501f45342 --- /dev/null +++ b/modules/cmsis_6/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2023 Nordic Semiconductor ASA +# Copyright 2025 Arm Limited and/or its affiliates +# SPDX-License-Identifier: Apache-2.0 + +add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} cmsis_6) + +if(CONFIG_CPU_CORTEX_M) + zephyr_include_directories(.) +endif() diff --git a/modules/cmsis_6/Kconfig b/modules/cmsis_6/Kconfig new file mode 100644 index 00000000000..6da2792698e --- /dev/null +++ b/modules/cmsis_6/Kconfig @@ -0,0 +1,28 @@ +# Copyright (c) 2016 Intel Corporation +# Copyright 2025 Arm Limited and/or its affiliates +# SPDX-License-Identifier: Apache-2.0 + +config ZEPHYR_CMSIS_6_MODULE + bool + +config HAS_CMSIS_CORE + bool + select HAS_CMSIS_CORE_M if CPU_CORTEX_M + +if HAS_CMSIS_CORE + +config HAS_CMSIS_CORE_M + bool + +config CMSIS_M_CHECK_DEVICE_DEFINES + bool "Check device defines" + depends on HAS_CMSIS_CORE_M + help + This options enables the validation of CMSIS configuration flags. + +config CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK + bool + help + Enable this option if CMSIS SystemCoreClock symbols is available. + +endif diff --git a/modules/cmsis_6/cmsis_core.h b/modules/cmsis_6/cmsis_core.h new file mode 100644 index 00000000000..3d85be7a396 --- /dev/null +++ b/modules/cmsis_6/cmsis_core.h @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2023 Nordic Semiconductor ASA + * Copyright 2025 Arm Limited and/or its affiliates + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_MODULES_CMSIS_6_CMSIS_CORE_H_ +#define ZEPHYR_MODULES_CMSIS_6_CMSIS_CORE_H_ + +#if defined(CONFIG_CPU_CORTEX_M) +#include "cmsis_core_m.h" +#endif + +#endif /* ZEPHYR_MODULES_CMSIS_6_CMSIS_CORE_H_ */ diff --git a/modules/cmsis/cmsis_core_m.h b/modules/cmsis_6/cmsis_core_m.h similarity index 90% rename from modules/cmsis/cmsis_core_m.h rename to modules/cmsis_6/cmsis_core_m.h index c8552f0ee77..4137e853376 100644 --- a/modules/cmsis/cmsis_core_m.h +++ b/modules/cmsis_6/cmsis_core_m.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2017 Nordic Semiconductor ASA - * Copyright (c) 2023 Arm Limited + * Copyright 2023,2025 Arm Limited and/or its affiliates * * SPDX-License-Identifier: Apache-2.0 */ @@ -12,8 +12,8 @@ * This header contains the interface to the ARM CMSIS Core headers. */ -#ifndef ZEPHYR_MODULES_CMSIS_CMSIS_M_H_ -#define ZEPHYR_MODULES_CMSIS_CMSIS_M_H_ +#ifndef ZEPHYR_MODULES_CMSIS_6_CMSIS_CORE_M_H_ +#define ZEPHYR_MODULES_CMSIS_6_CMSIS_CORE_M_H_ #if defined(CONFIG_CMSIS_M_CHECK_DEVICE_DEFINES) && CONFIG_CMSIS_M_CHECK_DEVICE_DEFINES == 1U #define __CHECK_DEVICE_DEFINES 1U @@ -68,4 +68,4 @@ #error "__SAUREGION_PRESENT and CONFIG_CPU_HAS_ARM_SAU are not set to the same value" #endif -#endif /* ZEPHYR_MODULES_CMSIS_CMSIS_M_H_ */ +#endif /* ZEPHYR_MODULES_CMSIS_6_CMSIS_CORE_M_H_ */ diff --git a/modules/cmsis/cmsis_core_m_defaults.h b/modules/cmsis_6/cmsis_core_m_defaults.h similarity index 93% rename from modules/cmsis/cmsis_core_m_defaults.h rename to modules/cmsis_6/cmsis_core_m_defaults.h index f2c0656d220..bb084440ef7 100644 --- a/modules/cmsis/cmsis_core_m_defaults.h +++ b/modules/cmsis_6/cmsis_core_m_defaults.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2017 Nordic Semiconductor ASA - * Copyright (c) 2023 Arm Limited + * Copyright 2023,2025 Arm Limited and/or its affiliates * * SPDX-License-Identifier: Apache-2.0 */ @@ -13,8 +13,8 @@ * ARM CMSIS Core headers. */ -#ifndef ZEPHYR_MODULES_CMSIS_CMSIS_M_DEFAULTS_H_ -#define ZEPHYR_MODULES_CMSIS_CMSIS_M_DEFAULTS_H_ +#ifndef ZEPHYR_MODULES_CMSIS_6_CMSIS_CORE_M_DEFAULTS_H_ +#define ZEPHYR_MODULES_CMSIS_6_CMSIS_CORE_M_DEFAULTS_H_ #include @@ -143,4 +143,4 @@ typedef enum { #error "Unknown Cortex-M device" #endif -#endif /* ZEPHYR_MODULES_CMSIS_CMSIS_M_DEFAULTS_H_ */ +#endif /* ZEPHYR_MODULES_CMSIS_6_CMSIS_CORE_M_DEFAULTS_H_ */ diff --git a/modules/trusted-firmware-m/CMakeLists.txt b/modules/trusted-firmware-m/CMakeLists.txt index ff4a3093fdc..716c53ab2cf 100644 --- a/modules/trusted-firmware-m/CMakeLists.txt +++ b/modules/trusted-firmware-m/CMakeLists.txt @@ -289,7 +289,7 @@ if (CONFIG_BUILD_WITH_TFM) ${TFM_CMAKE_ARGS} $> -DMBEDCRYPTO_PATH=$>,$,${ZEPHYR_MBEDTLS_MODULE_DIR}> - -DCMSIS_PATH=${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/platform/ext/cmsis + -DCMSIS_PATH=${ZEPHYR_CMSIS_6_MODULE_DIR} ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR} WORKING_DIRECTORY ${TFM_BINARY_DIR} COMMAND_EXPAND_LISTS diff --git a/west.yml b/west.yml index 984bb9c21b2..53598678f06 100644 --- a/west.yml +++ b/west.yml @@ -129,8 +129,10 @@ manifest: path: modules/lib/cmsis-nn - name: cmsis_6 repo-path: CMSIS_6 - revision: 783317a3072554acbac86cca2ff24928cbf98d30 - path: modules/lib/cmsis_6 + revision: 6dd50439a9b83398ff2ae1376eef0a2a0b95913b + path: modules/hal/cmsis_6 + groups: + - hal - name: edtt revision: b9ca3c7030518f07b7937dacf970d37a47865a76 path: tools/edtt @@ -358,7 +360,7 @@ manifest: groups: - tee - name: trusted-firmware-m - revision: e2288c13ee0abc16163186523897e7910b03dd31 + revision: 64738996dca5f5e058e0a358b81033f4b792be27 path: modules/tee/tf-m/trusted-firmware-m groups: - tee