diff --git a/ext/hal/cmsis/CMakeLists.txt b/ext/hal/cmsis/CMakeLists.txt index 80e9cdb2672..e0c61fef0a1 100644 --- a/ext/hal/cmsis/CMakeLists.txt +++ b/ext/hal/cmsis/CMakeLists.txt @@ -1,11 +1,3 @@ -if(CONFIG_HAS_CMSIS) - zephyr_include_directories(Include) -endif() +# SPDX-License-Identifier: Apache-2.0 -# As of CMSIS v5.6.0, __PROGRAM_START is to indicate whether the -# ARM vendor or the OS supplies data/bss init routine, otherwise -# the default data/bss init routine for the selected toolchain is -# added. We set the macro in build-time to guarantee compatibility -# with all existing ARM platforms. - -zephyr_compile_definitions(__PROGRAM_START) +add_subdirectory_ifdef(CONFIG_HAS_CMSIS_CORE_M Core) diff --git a/ext/hal/cmsis/Core/CMakeLists.txt b/ext/hal/cmsis/Core/CMakeLists.txt new file mode 100644 index 00000000000..08d3c9934b0 --- /dev/null +++ b/ext/hal/cmsis/Core/CMakeLists.txt @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: Apache-2.0 + +zephyr_include_directories(Include) + +# As of CMSIS v5.6.0, __PROGRAM_START is to indicate whether the +# ARM vendor or the OS supplies data/bss init routine, otherwise +# the default data/bss init routine for the selected toolchain is +# added. We set the macro in build-time to guarantee compatibility +# with all existing ARM platforms. + +zephyr_compile_definitions(__PROGRAM_START) diff --git a/ext/hal/cmsis/Kconfig b/ext/hal/cmsis/Kconfig index 22bb8b2f28b..0e45d15ba80 100644 --- a/ext/hal/cmsis/Kconfig +++ b/ext/hal/cmsis/Kconfig @@ -1,8 +1,13 @@ -# # Copyright (c) 2016 Intel Corporation -# # SPDX-License-Identifier: Apache-2.0 -# -config HAS_CMSIS +config HAS_CMSIS_CORE bool + select HAS_CMSIS_CORE_M if CPU_CORTEX_M + +if HAS_CMSIS_CORE + +config HAS_CMSIS_CORE_M + bool + +endif diff --git a/ext/hal/cmsis/README b/ext/hal/cmsis/README index 1afa679f128..fad9b144e7d 100644 --- a/ext/hal/cmsis/README +++ b/ext/hal/cmsis/README @@ -1,15 +1,15 @@ The ARM Cortex Microcontroller Software Interface Standard (CMSIS) defines a -set of standard interfaces to ARM Cortex-M SOCs. In particular, the CMSIS-CORE -component standardizes the software interface to core and peripheral registers, -as well as exception names and the system clock frequency. Multiple SOC -vendors, including NXP and Nordic Semiconductor, include the CMSIS-CORE header -files in their SOC header files. These SOC header files are in turn used by -the vendor's peripheral drivers. +set of standard interfaces to ARM Cortex family SOCs. In particular, the +CMSIS-CORE component standardizes the software interface to core and peripheral +registers, as well as exception names and the system clock frequency. Multiple +SOC vendors, including NXP and Nordic Semiconductor, include the CMSIS-CORE +header files in their SOC header files. These SOC header files are in turn used +by the vendor's peripheral drivers. http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php The sources in this directory are imported from https://github.com/ARM-software/CMSIS_5.git -The current version supported in Zephyr is +The current version supported in Zephyr is https://github.com/ARM-software/CMSIS_5/releases/tag/5.5.1