From 9e47d033a58ad9b2e03278118c1cad5aa6c7429d Mon Sep 17 00:00:00 2001 From: Markus Klein Date: Thu, 22 Dec 2022 14:56:57 +0100 Subject: [PATCH] Added prefix 'cmsis_generic_' to core independent files --- CMSIS/Core/{armcc.h => cmsis_generic_armcc.h} | 0 .../{armclang.h => cmsis_generic_armclang.h} | 0 ...ang_ltm.h => cmsis_generic_armclang_ltm.h} | 0 .../{compiler.h => cmsis_generic_compiler.h} | 0 CMSIS/Core/{gcc.h => cmsis_generic_gcc.h} | 2 +- .../Core/{iccarm.h => cmsis_generic_iccarm.h} | 1 - .../{version.h => cmsis_generic_version.h} | 4 +-- CMSIS/Core_A/Include/cmsis_armcc.h | 2 +- CMSIS/Core_A/Include/cmsis_armclang.h | 2 +- CMSIS/Core_A/Include/cmsis_compiler.h | 2 +- CMSIS/Core_A/Include/cmsis_gcc.h | 2 +- CMSIS/Core_A/Include/cmsis_iccarm.h | 2 +- CMSIS/Core_A/Include/cmsis_version.h | 36 +++++++++++++++++++ CMSIS/Core_M/Include/cmsis_armcc.h | 2 +- CMSIS/Core_M/Include/cmsis_armclang.h | 2 +- CMSIS/Core_M/Include/cmsis_armclang_ltm.h | 2 +- CMSIS/Core_M/Include/cmsis_compiler.h | 2 +- CMSIS/Core_M/Include/cmsis_gcc.h | 2 +- CMSIS/Core_M/Include/cmsis_iccarm.h | 2 +- CMSIS/Core_M/Include/cmsis_version.h | 11 +++--- CMSIS/Core_R/Include/cmsis_armcc.h | 2 +- CMSIS/Core_R/Include/cmsis_armclang.h | 2 +- CMSIS/Core_R/Include/cmsis_compiler.h | 2 +- CMSIS/Core_R/Include/cmsis_gcc.h | 2 +- CMSIS/Core_R/Include/cmsis_iccarm.h | 2 +- CMSIS/Core_R/Include/cmsis_version.h | 36 +++++++++++++++++++ 26 files changed, 95 insertions(+), 27 deletions(-) rename CMSIS/Core/{armcc.h => cmsis_generic_armcc.h} (100%) rename CMSIS/Core/{armclang.h => cmsis_generic_armclang.h} (100%) rename CMSIS/Core/{armclang_ltm.h => cmsis_generic_armclang_ltm.h} (100%) rename CMSIS/Core/{compiler.h => cmsis_generic_compiler.h} (100%) rename CMSIS/Core/{gcc.h => cmsis_generic_gcc.h} (99%) rename CMSIS/Core/{iccarm.h => cmsis_generic_iccarm.h} (99%) rename CMSIS/Core/{version.h => cmsis_generic_version.h} (96%) create mode 100644 CMSIS/Core_A/Include/cmsis_version.h create mode 100644 CMSIS/Core_R/Include/cmsis_version.h diff --git a/CMSIS/Core/armcc.h b/CMSIS/Core/cmsis_generic_armcc.h similarity index 100% rename from CMSIS/Core/armcc.h rename to CMSIS/Core/cmsis_generic_armcc.h diff --git a/CMSIS/Core/armclang.h b/CMSIS/Core/cmsis_generic_armclang.h similarity index 100% rename from CMSIS/Core/armclang.h rename to CMSIS/Core/cmsis_generic_armclang.h diff --git a/CMSIS/Core/armclang_ltm.h b/CMSIS/Core/cmsis_generic_armclang_ltm.h similarity index 100% rename from CMSIS/Core/armclang_ltm.h rename to CMSIS/Core/cmsis_generic_armclang_ltm.h diff --git a/CMSIS/Core/compiler.h b/CMSIS/Core/cmsis_generic_compiler.h similarity index 100% rename from CMSIS/Core/compiler.h rename to CMSIS/Core/cmsis_generic_compiler.h diff --git a/CMSIS/Core/gcc.h b/CMSIS/Core/cmsis_generic_gcc.h similarity index 99% rename from CMSIS/Core/gcc.h rename to CMSIS/Core/cmsis_generic_gcc.h index 5260a1704d..b921baa442 100644 --- a/CMSIS/Core/gcc.h +++ b/CMSIS/Core/cmsis_generic_gcc.h @@ -23,7 +23,7 @@ */ #ifndef __CMSIS_GENERIC_GCC_H -#define __CMSIS_GCC_H +#define __CMSIS_GENERIC_GCC_H /* ignore some GCC warnings */ #pragma GCC diagnostic push diff --git a/CMSIS/Core/iccarm.h b/CMSIS/Core/cmsis_generic_iccarm.h similarity index 99% rename from CMSIS/Core/iccarm.h rename to CMSIS/Core/cmsis_generic_iccarm.h index 00961b0522..45b2846f7b 100644 --- a/CMSIS/Core/iccarm.h +++ b/CMSIS/Core/cmsis_generic_iccarm.h @@ -25,7 +25,6 @@ // //------------------------------------------------------------------------------ - #ifndef __CMSIS_GENERIC_ICCARM_H__ #define __CMSIS_GENERIC_ICCARM_H__ diff --git a/CMSIS/Core/version.h b/CMSIS/Core/cmsis_generic_version.h similarity index 96% rename from CMSIS/Core/version.h rename to CMSIS/Core/cmsis_generic_version.h index 33ff753648..2705876e58 100644 --- a/CMSIS/Core/version.h +++ b/CMSIS/Core/cmsis_generic_version.h @@ -28,8 +28,8 @@ #pragma clang system_header /* treat file as system include file */ #endif -#ifndef __CMSIS_VERSION_H -#define __CMSIS_VERSION_H +#ifndef __CMSIS_GENERIC_VERSION_H +#define __CMSIS_GENERIC_VERSION_H /* CMSIS Version definitions */ #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(A/R/M) main version */ diff --git a/CMSIS/Core_A/Include/cmsis_armcc.h b/CMSIS/Core_A/Include/cmsis_armcc.h index dc9591baf5..3422373256 100644 --- a/CMSIS/Core_A/Include/cmsis_armcc.h +++ b/CMSIS/Core_A/Include/cmsis_armcc.h @@ -26,7 +26,7 @@ #define __CMSIS_ARMCC_H // Include the generic settigs: -#include "./../../Core/armcc.h" +#include "./../../Core/cmsis_generic_armcc.h" /** \brief Get CPSR (Current Program Status Register) diff --git a/CMSIS/Core_A/Include/cmsis_armclang.h b/CMSIS/Core_A/Include/cmsis_armclang.h index 292ae4d952..87c94c4c3c 100644 --- a/CMSIS/Core_A/Include/cmsis_armclang.h +++ b/CMSIS/Core_A/Include/cmsis_armclang.h @@ -30,7 +30,7 @@ #pragma clang system_header /* treat file as system include file */ // Include the generic settigs: -#include "./../../Core/armclang.h" +#include "./../../Core/cmsis_generic_armclang.h" /* ########################### Core Function Access ########################### */ diff --git a/CMSIS/Core_A/Include/cmsis_compiler.h b/CMSIS/Core_A/Include/cmsis_compiler.h index a5197bfa15..49d2923698 100644 --- a/CMSIS/Core_A/Include/cmsis_compiler.h +++ b/CMSIS/Core_A/Include/cmsis_compiler.h @@ -25,7 +25,7 @@ #ifndef __CMSIS_COMPILER_H #define __CMSIS_COMPILER_H -#include "./../../Core/compiler.h" +#include "./../../Core/cmsis_generic_compiler.h" #endif /* __CMSIS_COMPILER_H */ diff --git a/CMSIS/Core_A/Include/cmsis_gcc.h b/CMSIS/Core_A/Include/cmsis_gcc.h index 0a576a123a..84bade20b5 100644 --- a/CMSIS/Core_A/Include/cmsis_gcc.h +++ b/CMSIS/Core_A/Include/cmsis_gcc.h @@ -26,7 +26,7 @@ #define __CMSIS_GCC_H // Include the generic settigs: -#include "./../../Core/gcc.h" +#include "./../../Core/cmsis_generic_gcc.h" /* ignore some GCC warnings */ #pragma GCC diagnostic push diff --git a/CMSIS/Core_A/Include/cmsis_iccarm.h b/CMSIS/Core_A/Include/cmsis_iccarm.h index ba5c1da8a1..372ccfe851 100644 --- a/CMSIS/Core_A/Include/cmsis_iccarm.h +++ b/CMSIS/Core_A/Include/cmsis_iccarm.h @@ -30,7 +30,7 @@ #define __CMSIS_ICCARM_H__ // Include the generic settigs: -#include "./../../Core/iccarm.h" +#include "./../../Core/cmsis_generic_iccarm.h" #ifndef __ICCARM__ #error This file should only be compiled by ICCARM diff --git a/CMSIS/Core_A/Include/cmsis_version.h b/CMSIS/Core_A/Include/cmsis_version.h new file mode 100644 index 0000000000..995ee3c083 --- /dev/null +++ b/CMSIS/Core_A/Include/cmsis_version.h @@ -0,0 +1,36 @@ +/**************************************************************************//** + * @file cmsis_version.h + * @brief CMSIS Core(M) Version definitions + * @version V5.1.0 + * @date 02. February 2022 + ******************************************************************************/ +/* + * Copyright (c) 2009-2022 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CMSIS_VERSION_H +#define __CMSIS_VERSION_H + +#include "./../../Core/cmsis_generic_version.h" + +#endif diff --git a/CMSIS/Core_M/Include/cmsis_armcc.h b/CMSIS/Core_M/Include/cmsis_armcc.h index fccc9d0dba..5bb0c4f8ea 100644 --- a/CMSIS/Core_M/Include/cmsis_armcc.h +++ b/CMSIS/Core_M/Include/cmsis_armcc.h @@ -26,7 +26,7 @@ #define __CMSIS_ARMCC_H // Include the generic settigs: -#include "./../../Core/armcc.h" +#include "./../../Core/cmsis_generic_armcc.h" /* ######################### Startup and Lowlevel Init ######################## */ diff --git a/CMSIS/Core_M/Include/cmsis_armclang.h b/CMSIS/Core_M/Include/cmsis_armclang.h index f14eafe6a5..1cc40b445e 100644 --- a/CMSIS/Core_M/Include/cmsis_armclang.h +++ b/CMSIS/Core_M/Include/cmsis_armclang.h @@ -30,7 +30,7 @@ #pragma clang system_header /* treat file as system include file */ // Include the generic settigs: -#include "./../../Core/armclang.h" +#include "./../../Core/cmsis_generic_armclang.h" /* ######################### Startup and Lowlevel Init ######################## */ diff --git a/CMSIS/Core_M/Include/cmsis_armclang_ltm.h b/CMSIS/Core_M/Include/cmsis_armclang_ltm.h index bb34ce7c0d..ceba6bb1e2 100644 --- a/CMSIS/Core_M/Include/cmsis_armclang_ltm.h +++ b/CMSIS/Core_M/Include/cmsis_armclang_ltm.h @@ -30,7 +30,7 @@ #pragma clang system_header /* treat file as system include file */ // Include the generic settigs: -#include "./../../Core/armclang_ltm.h" +#include "./../../Core/cmsis_generic_armclang_ltm.h" /* ######################### Startup and Lowlevel Init ######################## */ diff --git a/CMSIS/Core_M/Include/cmsis_compiler.h b/CMSIS/Core_M/Include/cmsis_compiler.h index a5197bfa15..49d2923698 100644 --- a/CMSIS/Core_M/Include/cmsis_compiler.h +++ b/CMSIS/Core_M/Include/cmsis_compiler.h @@ -25,7 +25,7 @@ #ifndef __CMSIS_COMPILER_H #define __CMSIS_COMPILER_H -#include "./../../Core/compiler.h" +#include "./../../Core/cmsis_generic_compiler.h" #endif /* __CMSIS_COMPILER_H */ diff --git a/CMSIS/Core_M/Include/cmsis_gcc.h b/CMSIS/Core_M/Include/cmsis_gcc.h index ff1e80fdd0..1e02a7422f 100644 --- a/CMSIS/Core_M/Include/cmsis_gcc.h +++ b/CMSIS/Core_M/Include/cmsis_gcc.h @@ -26,7 +26,7 @@ #define __CMSIS_GCC_H // Include the generic settigs: -#include "./../../Core/gcc.h" +#include "./../../Core/cmsis_generic_gcc.h" /* ignore some GCC warnings */ #pragma GCC diagnostic push diff --git a/CMSIS/Core_M/Include/cmsis_iccarm.h b/CMSIS/Core_M/Include/cmsis_iccarm.h index 7672ec75e6..4fdf861c1b 100644 --- a/CMSIS/Core_M/Include/cmsis_iccarm.h +++ b/CMSIS/Core_M/Include/cmsis_iccarm.h @@ -30,7 +30,7 @@ #define __CMSIS_ICCARM_H__ // Include the generic settigs: -#include "./../../Core/iccarm.h" +#include "./../../Core/cmsis_generic_iccarm.h" #ifndef __ICCARM__ #error This file should only be compiled by ICCARM diff --git a/CMSIS/Core_M/Include/cmsis_version.h b/CMSIS/Core_M/Include/cmsis_version.h index 8b4765f186..ad0ce4bddf 100644 --- a/CMSIS/Core_M/Include/cmsis_version.h +++ b/CMSIS/Core_M/Include/cmsis_version.h @@ -1,7 +1,7 @@ /**************************************************************************//** * @file cmsis_version.h * @brief CMSIS Core(M) Version definitions - * @version V5.0.5 + * @version V5.1.0 * @date 02. February 2022 ******************************************************************************/ /* @@ -31,9 +31,6 @@ #ifndef __CMSIS_VERSION_H #define __CMSIS_VERSION_H -/* CMSIS Version definitions */ -#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ -#define __CM_CMSIS_VERSION_SUB ( 6U) /*!< [15:0] CMSIS Core(M) sub version */ -#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ - __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ -#endif +#include "./../../Core/cmsis_generic_version.h" + +#endif \ No newline at end of file diff --git a/CMSIS/Core_R/Include/cmsis_armcc.h b/CMSIS/Core_R/Include/cmsis_armcc.h index 6b91678560..247aecc58d 100644 --- a/CMSIS/Core_R/Include/cmsis_armcc.h +++ b/CMSIS/Core_R/Include/cmsis_armcc.h @@ -26,7 +26,7 @@ #define __CMSIS_ARMCC_H // Include the generic settigs: -#include "./../../Core/armcc.h" +#include "./../../Core/cmsis_generic_armcc.h" diff --git a/CMSIS/Core_R/Include/cmsis_armclang.h b/CMSIS/Core_R/Include/cmsis_armclang.h index 9e0205ed5a..38ef66f668 100644 --- a/CMSIS/Core_R/Include/cmsis_armclang.h +++ b/CMSIS/Core_R/Include/cmsis_armclang.h @@ -28,6 +28,6 @@ #pragma clang system_header /* treat file as system include file */ // Include the generic settigs: -#include "./../../Core/armclang.h" +#include "./../../Core/cmsis_generic_armclang.h" #endif /* __CMSIS_ARMCLANG_H */ diff --git a/CMSIS/Core_R/Include/cmsis_compiler.h b/CMSIS/Core_R/Include/cmsis_compiler.h index 87bf3c00d0..ffaa70c735 100644 --- a/CMSIS/Core_R/Include/cmsis_compiler.h +++ b/CMSIS/Core_R/Include/cmsis_compiler.h @@ -25,7 +25,7 @@ #ifndef __CMSIS_COMPILER_H #define __CMSIS_COMPILER_H -#include "./../../Core/compiler.h" +#include "./../../Core/cmsis_generic_compiler.h" #endif /* __CMSIS_COMPILER_H */ diff --git a/CMSIS/Core_R/Include/cmsis_gcc.h b/CMSIS/Core_R/Include/cmsis_gcc.h index 3f87c2a27a..87ddffdc85 100644 --- a/CMSIS/Core_R/Include/cmsis_gcc.h +++ b/CMSIS/Core_R/Include/cmsis_gcc.h @@ -26,6 +26,6 @@ #define __CMSIS_GCC_H // Include the generic settigs: -#include "./../../Core/gcc.h" +#include "./../../Core/cmsis_generic_gcc.h" #endif /* __CMSIS_GCC_H */ diff --git a/CMSIS/Core_R/Include/cmsis_iccarm.h b/CMSIS/Core_R/Include/cmsis_iccarm.h index f1cda117e9..77da0f2b68 100644 --- a/CMSIS/Core_R/Include/cmsis_iccarm.h +++ b/CMSIS/Core_R/Include/cmsis_iccarm.h @@ -29,6 +29,6 @@ #define __CMSIS_ICCARM_H__ // Include the generic settigs: -#include "./../../Core/iccarm.h" +#include "./../../Core/cmsis_generic_iccarm.h" #endif /* __CMSIS_ICCARM_H__ */ diff --git a/CMSIS/Core_R/Include/cmsis_version.h b/CMSIS/Core_R/Include/cmsis_version.h new file mode 100644 index 0000000000..995ee3c083 --- /dev/null +++ b/CMSIS/Core_R/Include/cmsis_version.h @@ -0,0 +1,36 @@ +/**************************************************************************//** + * @file cmsis_version.h + * @brief CMSIS Core(M) Version definitions + * @version V5.1.0 + * @date 02. February 2022 + ******************************************************************************/ +/* + * Copyright (c) 2009-2022 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CMSIS_VERSION_H +#define __CMSIS_VERSION_H + +#include "./../../Core/cmsis_generic_version.h" + +#endif