Skip to content

Commit 3602b63

Browse files
committed
arch: arm: Refactor CONFIG_CORTEX_M
Clean up Kconfig so each SoC just selects the specific Cortex-M implementaiton rather than having to select both CORTEX_M and CORTEX_{M0, M3, M4, etc.}. Signed-off-by: Kumar Gala <[email protected]>
1 parent 117b1c7 commit 3602b63

File tree

26 files changed

+67
-79
lines changed

26 files changed

+67
-79
lines changed

arch/arm/core/Kconfig

-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ endchoice
6969

7070
endmenu
7171

72-
if CPU_CORTEX_M
7372
source "arch/arm/core/cortex_m/Kconfig"
74-
endif
7573

7674
if CPU_HAS_MPU
7775
source "arch/arm/core/cortex_m/mpu/Kconfig"

arch/arm/core/cortex_m/Kconfig

+67-53
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,71 @@
66
# SPDX-License-Identifier: Apache-2.0
77
#
88

9+
# NOTE: We have the specific core implementations first and outside of the
10+
# if CPU_CORTEX_M block so that SoCs can select which core they are using
11+
# without having to select all the options related to that core. Everything
12+
# else is captured inside the if CPU_CORTEX_M block so they are not exposed
13+
# if one select a differnet ARM Cortex Family (Cortex-A or Cortex-R)
14+
15+
config CPU_CORTEX_M0
16+
bool
17+
select CPU_CORTEX_M
18+
# Omit prompt to signify "hidden" option
19+
select ARMV6_M_ARMV8_M_BASELINE
20+
help
21+
This option signifies the use of a Cortex-M0 CPU
22+
23+
config CPU_CORTEX_M0PLUS
24+
bool
25+
select CPU_CORTEX_M
26+
# Omit prompt to signify "hidden" option
27+
select ARMV6_M_ARMV8_M_BASELINE
28+
help
29+
This option signifies the use of a Cortex-M0+ CPU
30+
31+
config CPU_CORTEX_M3
32+
bool
33+
select CPU_CORTEX_M
34+
# Omit prompt to signify "hidden" option
35+
select ARMV7_M_ARMV8_M_MAINLINE
36+
help
37+
This option signifies the use of a Cortex-M3 CPU
38+
39+
config CPU_CORTEX_M4
40+
bool
41+
select CPU_CORTEX_M
42+
# Omit prompt to signify "hidden" option
43+
select ARMV7_M_ARMV8_M_MAINLINE
44+
help
45+
This option signifies the use of a Cortex-M4 CPU
46+
47+
config CPU_CORTEX_M23
48+
bool
49+
select CPU_CORTEX_M
50+
# Omit prompt to signify "hidden" option
51+
select ARMV6_M_ARMV8_M_BASELINE
52+
help
53+
This option signifies the use of a Cortex-M23 CPU
54+
55+
config CPU_CORTEX_M33
56+
bool
57+
select CPU_CORTEX_M
58+
# Omit prompt to signify "hidden" option
59+
select ARMV7_M_ARMV8_M_MAINLINE
60+
help
61+
This option signifies the use of a Cortex-M33 CPU
62+
63+
config CPU_CORTEX_M7
64+
bool
65+
select CPU_CORTEX_M
66+
# Omit prompt to signify "hidden" option
67+
select ARMV7_M_ARMV8_M_MAINLINE
68+
default n
69+
help
70+
This option signifies the use of a Cortex-M7 CPU
71+
72+
if CPU_CORTEX_M
73+
974
config ISA_THUMB2
1075
bool
1176
# Omit prompt to signify "hidden" option
@@ -116,59 +181,6 @@ config ARMV7_M_ARMV8_M_FP
116181
implementation, or the use of an ARMv8-M processor
117182
implementation supporting the Floating-Point Extension.
118183

119-
config CPU_CORTEX_M0
120-
bool
121-
# Omit prompt to signify "hidden" option
122-
select ARMV6_M_ARMV8_M_BASELINE
123-
help
124-
This option signifies the use of a Cortex-M0 CPU
125-
126-
config CPU_CORTEX_M0PLUS
127-
bool
128-
# Omit prompt to signify "hidden" option
129-
select ARMV6_M_ARMV8_M_BASELINE
130-
help
131-
This option signifies the use of a Cortex-M0+ CPU
132-
133-
config CPU_CORTEX_M3
134-
bool
135-
# Omit prompt to signify "hidden" option
136-
select ARMV7_M_ARMV8_M_MAINLINE
137-
help
138-
This option signifies the use of a Cortex-M3 CPU
139-
140-
config CPU_CORTEX_M4
141-
bool
142-
# Omit prompt to signify "hidden" option
143-
select ARMV7_M_ARMV8_M_MAINLINE
144-
select ARMV7_M_ARMV8_M_FP if CPU_HAS_FPU
145-
help
146-
This option signifies the use of a Cortex-M4 CPU
147-
148-
config CPU_CORTEX_M23
149-
bool
150-
# Omit prompt to signify "hidden" option
151-
select ARMV6_M_ARMV8_M_BASELINE
152-
help
153-
This option signifies the use of a Cortex-M23 CPU
154-
155-
config CPU_CORTEX_M33
156-
bool
157-
# Omit prompt to signify "hidden" option
158-
select ARMV7_M_ARMV8_M_MAINLINE
159-
select ARMV7_M_ARMV8_M_FP if CPU_HAS_FPU
160-
help
161-
This option signifies the use of a Cortex-M33 CPU
162-
163-
config CPU_CORTEX_M7
164-
bool
165-
# Omit prompt to signify "hidden" option
166-
select ARMV7_M_ARMV8_M_MAINLINE
167-
select ARMV7_M_ARMV8_M_FP if CPU_HAS_FPU
168-
default n
169-
help
170-
This option signifies the use of a Cortex-M7 CPU
171-
172184
menu "ARM Cortex-M options"
173185
depends on CPU_CORTEX_M
174186

@@ -259,3 +271,5 @@ config SW_VECTOR_RELAY
259271
(or an Armv8-M baseline core) with no VTOR and no other hardware
260272
relocation table mechanisms.
261273
endmenu
274+
275+
endif # CPU_CORTEX_M

arch/arm/soc/arm/beetle/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
config SOC_SERIES_BEETLE
1010
bool "ARM Beetle MCU Series"
1111
depends on ARM
12-
select CPU_CORTEX_M
1312
select CPU_CORTEX_M3
1413
select SOC_FAMILY_ARM
1514
select CPU_HAS_SYSTICK

arch/arm/soc/arm/mps2/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ config SOC_SERIES_MPS2
88
bool "ARM MPS2 MCU Series"
99
depends on ARM
1010
select SOC_FAMILY_ARM
11-
select CPU_CORTEX_M
1211
select CPU_HAS_SYSTICK
1312
select GPIO_MMIO32 if GPIO
1413
help

arch/arm/soc/atmel_sam/sam3x/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
config SOC_SERIES_SAM3X
1010
bool "Atmel SAM3X MCU"
11-
select CPU_CORTEX_M
1211
select CPU_CORTEX_M3
1312
select SOC_FAMILY_SAM
1413
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/atmel_sam/sam4s/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_SAM4S
99
bool "Atmel SAM4S MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M4
1211
select SOC_FAMILY_SAM
1312
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/atmel_sam/same70/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
config SOC_SERIES_SAME70
88
bool "Atmel SAME70 MCU"
9-
select CPU_CORTEX_M
109
select CPU_CORTEX_M7
1110
select SOC_FAMILY_SAM
1211
select CPU_HAS_FPU

arch/arm/soc/atmel_sam0/samd21/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
config SOC_SERIES_SAMD21
77
bool "Atmel SAMD21 MCU"
8-
select CPU_CORTEX_M
98
select CPU_CORTEX_M0PLUS
109
select SOC_FAMILY_SAM0
1110
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/nordic_nrf5/nrf51/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_NRF51X
99
bool "Nordic Semiconductor nRF51 series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M0
1211
select SOC_FAMILY_NRF5
1312
select NRF_RTC_TIMER

arch/arm/soc/nordic_nrf5/nrf52/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_NRF52X
99
bool "Nordic Semiconductor nRF52 series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M4
1211
select CPU_HAS_FPU
1312
select CPU_HAS_MPU

arch/arm/soc/nxp_imx/rt/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_IMX_RT
99
bool "i.MX RT Series"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M7
1211
select SOC_FAMILY_IMX
1312
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/nxp_kinetis/k6x/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_KINETIS_K6X
99
bool "Kinetis K6x Series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M4
1211
select SOC_FAMILY_KINETIS
1312
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/nxp_kinetis/kl2x/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_KINETIS_KL2X
99
bool "Kinetis KL2x Series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M0PLUS
1211
select SOC_FAMILY_KINETIS
1312
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/nxp_kinetis/kwx/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_KINETIS_KWX
99
bool "Kinetis KWx Series MCU"
10-
select CPU_CORTEX_M
1110
select SOC_FAMILY_KINETIS
1211
select SYS_POWER_LOW_POWER_STATE_SUPPORTED
1312
select CPU_HAS_SYSTICK

arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_LPC54XXX
99
bool "LPC LPC54xxx Series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M4
1211
select SOC_FAMILY_LPC
1312
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/silabs_exx32/efm32wg/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_EFM32WG
99
bool "EFM32WG Series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M4
1211
select CPU_HAS_FPU
1312
select SOC_FAMILY_EXX32

arch/arm/soc/st_stm32/stm32f0/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_STM32F0X
99
bool "STM32F0x Series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M0
1211
select CPU_CORTEX_M0_HAS_VECTOR_TABLE_REMAP
1312
select SOC_FAMILY_STM32

arch/arm/soc/st_stm32/stm32f1/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_STM32F1X
99
bool "STM32F1x Series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M3
1211
select SOC_FAMILY_STM32
1312
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/st_stm32/stm32f3/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_STM32F3X
99
bool "STM32F3x Series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M4
1211
select SOC_FAMILY_STM32
1312
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/st_stm32/stm32f4/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_STM32F4X
99
bool "STM32F4x Series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M4
1211
select CPU_HAS_FPU
1312
select SOC_FAMILY_STM32

arch/arm/soc/st_stm32/stm32l0/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_STM32L0X
99
bool "STM32L0x Series MCU"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M0PLUS
1211
select CPU_CORTEX_M_HAS_VTOR
1312
select SOC_FAMILY_STM32

arch/arm/soc/st_stm32/stm32l4/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
config SOC_SERIES_STM32L4X
1010
bool "STM32L4x Series MCU"
11-
select CPU_CORTEX_M
1211
select CPU_CORTEX_M4
1312
select SOC_FAMILY_STM32
1413
select SYS_POWER_LOW_POWER_STATE_SUPPORTED

arch/arm/soc/ti_lm3s6965/Kconfig.soc

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
config SOC_TI_LM3S6965
33
bool "TI LM3S6965"
4-
select CPU_CORTEX_M
54
select CPU_CORTEX_M3
65
select CPU_HAS_SYSTICK
76

arch/arm/soc/ti_simplelink/cc2650/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
config SOC_SERIES_CC2650
77
bool "TI SimpleLink Family CC2650"
8-
select CPU_CORTEX_M
98
select CPU_CORTEX_M3
109
select SOC_FAMILY_TISIMPLELINK
1110
select CPU_HAS_SYSTICK

arch/arm/soc/ti_simplelink/cc32xx/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
config SOC_SERIES_CC32XX
55
bool "TI SimpleLink Family"
6-
select CPU_CORTEX_M
76
select CPU_CORTEX_M4
87
select SOC_FAMILY_TISIMPLELINK
98
select CPU_HAS_SYSTICK

arch/arm/soc/ti_simplelink/msp432p4xx/Kconfig.series

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
config SOC_SERIES_MSP432P4XX
99
bool "TI SimpleLink Family MSP432P4XX"
10-
select CPU_CORTEX_M
1110
select CPU_CORTEX_M4
1211
select SOC_FAMILY_TISIMPLELINK
1312
select CPU_HAS_FPU

0 commit comments

Comments
 (0)