Skip to content

Commit 304f5b0

Browse files
committed
modules: cmsis, cmsis_6: only add the intended cmsis module
The current code base is meant to use cmsis for Cortex A and R and cmsis_6 for Cortex M, but the build system is configured to include the path for both when Cortex M is selected. This leaves us exposed to PR using the old headers, that would not get caught in CI but would fail the build on a project using Cortex M that only has the cmsis_6 module. Change the cmsis module setting to only include the module files in the intended case. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent c016db9 commit 304f5b0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

modules/cmsis/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Copyright (c) 2023 Nordic Semiconductor ASA
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} cmsis)
5-
64
if(CONFIG_CPU_AARCH32_CORTEX_A OR CONFIG_CPU_AARCH32_CORTEX_R)
5+
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} cmsis)
76
zephyr_include_directories(.)
87
endif()

modules/cmsis_6/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Copyright 2025 Arm Limited and/or its affiliates <[email protected]>
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} cmsis_6)
5-
64
if(CONFIG_CPU_CORTEX_M)
5+
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} cmsis_6)
76
zephyr_include_directories(.)
87
endif()

0 commit comments

Comments
 (0)