Skip to content

Commit ee7ac70

Browse files
ibirnbaumcarlescufi
authored andcommitted
modules: cmsis: add core_ca inclusion for aarch32 Cortex-A SoCs
Add the inclusion of the Common Peripheral Access Layer for aarch32 Cortex-A SoCs in combination with the respective SoC's header file, in which the feature flags evaluated in core_ca.h must be provided. The corresponding CMSIS include path is added to the build by setting the HAS_CMSIS_CORE_A Kconfig item for all aarch32 Cortex-A CPUs. Signed-off-by: Immo Birnbaum <[email protected]>
1 parent 811d77a commit ee7ac70

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

include/arch/arm/aarch32/cortex_a_r/cmsis.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,18 @@ extern "C" {
2424
#define __CR_REV 0U
2525
#endif
2626

27+
#ifndef __CA_REV
28+
#define __CA_REV 0U
29+
#endif
30+
2731
#ifndef __FPU_PRESENT
2832
#define __FPU_PRESENT CONFIG_CPU_HAS_FPU
2933
#endif
3034

35+
#ifndef __MMU_PRESENT
36+
#define __MMU_PRESENT CONFIG_CPU_HAS_MMU
37+
#endif
38+
3139
#ifdef __cplusplus
3240
}
3341
#endif
@@ -38,6 +46,15 @@ extern "C" {
3846
#include <core_cr5.h>
3947
#elif defined(CONFIG_CPU_CORTEX_R7)
4048
#include <core_cr7.h>
49+
#elif defined(CONFIG_CPU_AARCH32_CORTEX_A)
50+
/*
51+
* Any defines relevant for the proper inclusion of CMSIS' Cortex-A
52+
* Common Peripheral Access Layer (such as __CORTEX_A) which are not
53+
* covered by the Kconfig-based default assignments above must be
54+
* provided by each aarch32 Cortex-A SoC's header file (already in-
55+
* cluded above).
56+
*/
57+
#include <core_ca.h>
4158
#else
4259
#error "Unknown device"
4360
#endif

modules/Kconfig.cmsis

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
config HAS_CMSIS_CORE
55
bool
66
select HAS_CMSIS_CORE_A if CPU_CORTEX_A
7+
select HAS_CMSIS_CORE_A if CPU_AARCH32_CORTEX_A
78
select HAS_CMSIS_CORE_R if CPU_CORTEX_R
89
select HAS_CMSIS_CORE_M if CPU_CORTEX_M
910

0 commit comments

Comments
 (0)