Skip to content

Commit

Permalink
* Retire the Core_A folder and use a single Core folder for all proce…
Browse files Browse the repository at this point in the history
…ssor core headers.

* Separate folders for different architecture profiles (A-profile, R-profile and M-profile)
* Top-level compiler headers will exist in the Core folder (no separate Compiler folder is needed).
** The cmsis_compiler.h header will continue to figure out which compiler toolchain is being used.
** The compiler toolchain specific headers in the Core folder will contain code common to all architecture profiles.
** Compiler headers specific to each architecture profiles can reside within the new architecture profile folders.
** The second-level files like cmsis_gcc.h are named cmsis_gcc_a.h, cmsis_gcc_r.h and cmsis_gcc_m.h to avoid having multiple files with the same name
*For any features that are common to more than one architecture profile, e.g, the GIC is common to A-profile and R-profile, we can include the GIC header in each architectural folder, but only one of these files contains the code to avoid duplication. The file with the same name that doesn't include the code will simply include the code from the other folder- this should hopefully be clear to developers.
* removed deprecated core_armv8xxx.h files. The files were added because no specific ARM v8-M device was available when Arm v-M support was added.
* removed deprecated file cmsis_armcc_a.h. This compiler support is obsolete
  • Loading branch information
Masmiseim36 committed Aug 8, 2023
1 parent 9b88e7f commit f8dcdb2
Show file tree
Hide file tree
Showing 62 changed files with 319 additions and 9,860 deletions.
4 changes: 2 additions & 2 deletions ARM.CMSIS.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
<api Cclass="Device" Cgroup="IRQ Controller" Capiversion="1.0.0" exclusive="1">
<description>Device interrupt controller interface</description>
<files>
<file category="header" name="CMSIS/Core/Include/irq_ctrl.h"/>
<file category="header" name="CMSIS/Core/Include/a-profile/irq_ctrl.h"/>
</files>
</api>
<api Cclass="Device" Cgroup="OS Tick" Capiversion="1.0.1" exclusive="1">
Expand Down Expand Up @@ -648,7 +648,7 @@

<components>
<!-- CMSIS-Core component -->
<component Cclass="CMSIS" Cgroup="CORE" Cversion="5.6.0" condition="ARMv6_7_8-M Device" >
<component Cclass="CMSIS" Cgroup="CORE" Cversion="5.7.0" condition="ARMv6_7_8-M Device" >
<description>CMSIS-CORE for Cortex-M, SC000, SC300, Star-MC1, ARMv8-M, ARMv8.1-M</description>
<files>
<!-- CPU independent -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ typedef union
#endif /* #if (__L2C_PRESENT == 1U) || defined(DOXYGEN) */

#if (__GIC_PRESENT == 1U) || defined(DOXYGEN)
#include "gic_v20.h"
#include "gicv2.h"
#endif /* (__GIC_PRESENT == 1U) || defined(DOXYGEN) */

#if (__TIM_PRESENT == 1U) || defined(DOXYGEN)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**************************************************************************//**
* @file cmsis_armclang_corea.h
* @file cmsis_armclang_a.h
* @brief CMSIS compiler armclang (Arm Compiler 6) header file
* @version V5.5.0
* @date 04. December 2022
Expand Down Expand Up @@ -29,8 +29,9 @@

#pragma clang system_header /* treat file as system include file */

// Include the generic settings:
#include "cmsis_armclang.h"
#ifndef __CMSIS_ARMCLANG_H
#error "This file must not be included directly"
#endif


/* ########################### Core Function Access ########################### */
Expand Down Expand Up @@ -147,6 +148,8 @@ __STATIC_FORCEINLINE void __set_FPEXC(uint32_t fpexc)
#endif
}

/** @} end of CMSIS_Core_RegAccFunctions */


/*
* Include common core functions to access Coprocessor 15 registers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**************************************************************************//**
* @file cmsis_armclang_corea.h
* @file cmsis_clang_a.h
* @brief CMSIS compiler armclang (Arm Compiler 6) header file
* @version V5.5.0
* @date 04. December 2022
Expand Down Expand Up @@ -27,8 +27,9 @@

#pragma clang system_header /* treat file as system include file */

// Include the generic settings:
#include "cmsis_clang.h"
#ifndef __CMSIS_CLANG_H
#error "This file must not be included directly"
#endif


/* ########################### Core Function Access ########################### */
Expand Down Expand Up @@ -145,6 +146,7 @@ __STATIC_FORCEINLINE void __set_FPEXC(uint32_t fpexc)
#endif
}

/** @} end of CMSIS_Core_RegAccFunctions */

/*
* Include common core functions to access Coprocessor 15 registers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**************************************************************************//**
* @file cmsis_gcc_corea.h
* @file cmsis_gcc_a.h
* @brief CMSIS compiler GCC header file
* @version V6.0.0
* @date 4. August 2023
Expand All @@ -22,11 +22,12 @@
* limitations under the License.
*/

#ifndef __CMSIS_GCC_COREA_H
#define __CMSIS_GCC_COREA_H
#ifndef __CMSIS_GCC_A_H
#define __CMSIS_GCC_A_H

// Include the generic settings:
#include "cmsis_gcc.h"
#ifndef __CMSIS_GCC_H
#error "This file must not be included directly"
#endif

/* ignore some GCC warnings */
#pragma GCC diagnostic push
Expand Down Expand Up @@ -254,4 +255,4 @@ __STATIC_INLINE void __FPU_Enable(void)

#pragma GCC diagnostic pop

#endif /* __CMSIS_GCC_COREA_H */
#endif /* __CMSIS_GCC_A_H */
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**************************************************************************//**
* @file cmsis_iccarm_corea.h
* @file cmsis_iccarm_a.h
* @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file
* @version V5.1.0
* @date 04. December 2022
Expand Down Expand Up @@ -29,8 +29,9 @@
#ifndef __CMSIS_ICCARM_COREA_H__
#define __CMSIS_ICCARM_COREA_H__

// Include the generic settigs:
#include "cmsis_iccarm.h"
#ifndef __CMSIS_ICCARM_H__
#error "This file must not be included directly"
#endif

#ifndef __ICCARM__
#error This file should only be compiled by ICCARM
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions CMSIS/Core/Include/cmsis_armclang.h
Original file line number Diff line number Diff line change
Expand Up @@ -832,5 +832,15 @@ __STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3)
#endif /* (__ARM_FEATURE_DSP == 1) */
/** @} end of group CMSIS_SIMD_intrinsics */

// Include the profile specific settings:
#if defined __CORTEX_A
#include "./a-profile/cmsis_armclang_a.h"
#elif defined __CORTEX_R
#include "./r-profile/cmsis_armclang_r.h"
#elif defined __CORTEX_M
#include "./m-profile/cmsis_armclang_m.h"
#else
#error "Unknown architecture"
#endif

#endif /* __CMSIS_ARMCLANG_H */
10 changes: 10 additions & 0 deletions CMSIS/Core/Include/cmsis_clang.h
Original file line number Diff line number Diff line change
Expand Up @@ -833,5 +833,15 @@ __STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3)
#endif /* (__ARM_FEATURE_DSP == 1) */
/** @} end of group CMSIS_SIMD_intrinsics */

// Include the profile specific settings:
#if defined __CORTEX_A
#include "a-profile/cmsis_clang_a.h"
#elif defined __CORTEX_R
#include "r-profile/cmsis_clang_r.h"
#elif defined __CORTEX_M
#include "m-profile/cmsis_clang_m.h"
#else
#error "Unknown architecture"
#endif

#endif /* __CMSIS_CLANG_H */
53 changes: 8 additions & 45 deletions CMSIS/Core/Include/cmsis_compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,71 +31,34 @@
* Arm Compiler above 6.10.1 (armclang)
*/
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100)
#if defined __CORTEX_A
#include "cmsis_armclang_corema.h"
#elif defined __CORTEX_R
#include "cmsis_armclang_corer.h"
#elif defined __CORTEX_M
#include "cmsis_armclang.h"
#else
#error "Unknown architecture"
#endif
#include "cmsis_armclang.h"

/*
* TI Arm Clang Compiler (tiarmclang)
*/
#elif defined (__ti__)
#if defined __CORTEX_A
#error "Core-R is not supported for this compiler"
#elif defined __CORTEX_R
#error "Core-R is not supported for this compiler"
#elif defined __CORTEX_M
#include "cmsis_tiarmclang_corem.h"
#else
#error "Unknown architecture"
#endif
#include "cmsis_tiarmclang.h"


/*
* LLVM/Clang Compiler
*/
#elif defined ( __clang__ )
#if defined __CORTEX_A
#include "cmsis_clang_corea.h"
#elif defined __CORTEX_R
#include "cmsis_clang_corer.h"
#elif defined __CORTEX_M
#include "cmsis_clang_corem.h"
#else
#error "Unknown architecture"
#endif
#include "cmsis_clang.h"


/*
* GNU Compiler
*/
#elif defined ( __GNUC__ )
#if defined __CORTEX_A
#include "cmsis_gcc_corea.h"
#elif defined __CORTEX_R
#include "cmsis_gcc_corer.h"
#elif defined __CORTEX_M
#include "cmsis_gcc_corem.h"
#else
#error "Unknown architecture"
#endif
#include "cmsis_gcc.h"


/*
* IAR Compiler
*/
#elif defined ( __ICCARM__ )
#if defined __CORTEX_A
#include "cmsis_iccarm_corea.h"
#elif defined __CORTEX_R
#include "cmsis_iccarm_corer.h"
#elif defined __CORTEX_M
#include "cmsis_iccarm_corem.h"
#else
#error "Unknown architecture"
#endif
#include "cmsis_iccarm.h"


/*
Expand Down
11 changes: 11 additions & 0 deletions CMSIS/Core/Include/cmsis_gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -982,4 +982,15 @@ __STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3)

#pragma GCC diagnostic pop

// Include the profile specific settings:
#if defined __CORTEX_A
#include "a-profile/cmsis_gcc_a.h"
#elif defined __CORTEX_R
#include "r-profile/cmsis_gcc_r.h"
#elif defined __CORTEX_M
#include "m-profile/cmsis_gcc_m.h"
#else
#error "Unknown architecture"
#endif

#endif /* __CMSIS_GCC_H */
12 changes: 12 additions & 0 deletions CMSIS/Core/Include/cmsis_iccarm.h
Original file line number Diff line number Diff line change
Expand Up @@ -905,4 +905,16 @@
#define __PKHBT __iar_builtin_PKHBT
#define __PKHTB __iar_builtin_PKHTB
#endif /* __ICCARM_INTRINSICS_VERSION__ == 2 && __ARM_MEDIA__*/

// Include the profile specific settings:
#if defined __CORTEX_A
#include "a-profile/cmsis_iccarm_a.h"
#elif defined __CORTEX_R
#include "r-profile/cmsis_iccarm_r.h"
#elif defined __CORTEX_M
#include "m-profile/cmsis_iccarm_m.h"
#else
#error "Unknown architecture"
#endif

#endif /* __CMSIS_ICCARM_H__ */
10 changes: 10 additions & 0 deletions CMSIS/Core/Include/cmsis_tiarmclang.h
Original file line number Diff line number Diff line change
Expand Up @@ -819,5 +819,15 @@ __STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3)
#endif /* (__ARM_FEATURE_DSP == 1) */
/** @} end of group CMSIS_SIMD_intrinsics */

// Include the profile specific settings:
#if defined __CORTEX_A
#error "Core-A is not supported for this compiler"
#elif defined __CORTEX_R
#error "Core-R is not supported for this compiler"
#elif defined __CORTEX_M
#include "m-profile/cmsis_tiarmclang_m.h"
#else
#error "Unknown architecture"
#endif

#endif /* __CMSIS_TIARMCLANG_H */
Loading

0 comments on commit f8dcdb2

Please sign in to comment.