soc: v2: stm32: Migrate STM32F3 series

Port STM32F3 series to HW model V2

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
This commit is contained in:
Abderrahmane Jarmouni
2024-02-06 14:20:47 +01:00
committed by Jamie McCrae
parent 85b9eee7e8
commit 8d84861390
15 changed files with 87 additions and 74 deletions

View File

@@ -1,39 +0,0 @@
# ST Microelectronics STM32F3 MCU line
# Copyright (c) 2016 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
choice
prompt "STM32F3x MCU Selection"
depends on SOC_SERIES_STM32F3X
config SOC_STM32F302X8
bool "STM32F302X8"
config SOC_STM32F302XC
bool "STM32F302XC"
select CPU_HAS_ARM_MPU
config SOC_STM32F303X8
bool "STM32F303X8"
config SOC_STM32F303XB
bool "STM32F303XB"
select CPU_HAS_ARM_MPU
config SOC_STM32F303XC
bool "STM32F303XC"
select CPU_HAS_ARM_MPU
config SOC_STM32F303XE
bool "STM32F303XE"
select CPU_HAS_ARM_MPU
config SOC_STM32F334X8
bool "STM32F334X8"
config SOC_STM32F373XC
bool "STM32F373XC"
select CPU_HAS_ARM_MPU
endchoice

View File

@@ -66,3 +66,13 @@ family:
- name: stm32mp1x
socs:
- name: stm32mp157cxx
- name: stm32f3x
socs:
- name: stm32f302x8
- name: stm32f302xc
- name: stm32f303x8
- name: stm32f303xb
- name: stm32f303xc
- name: stm32f303xe
- name: stm32f334x8
- name: stm32f373xc

View File

@@ -5,4 +5,6 @@ zephyr_sources(
soc.c
)
zephyr_include_directories(.)
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "")

View File

@@ -1,16 +1,12 @@
# ST Microelectronics STM32F3 MCU series
# STMicroelectronics STM32F3 MCU series
# Copyright (c) 2016 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32F3X
bool "STM32F3x Series MCU"
select ARM
select CPU_CORTEX_M4
select CPU_CORTEX_M_HAS_DWT
select SOC_FAMILY_STM32
select CPU_HAS_FPU
select HAS_STM32CUBE
select HAS_SWO
help
Enable support for STM32F3 MCU series

View File

@@ -1,4 +1,4 @@
# ST Microelectronics STM32F3 MCU line
# STMicroelectronics STM32F3 MCU line
# Copyright (c) 2016 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
@@ -7,7 +7,7 @@
if SOC_SERIES_STM32F3X
source "soc/soc_legacy/arm/st_stm32/stm32f3/Kconfig.defconfig.stm32f3*"
rsource "Kconfig.defconfig.stm32f3*"
config SOC_SERIES
default "stm32f3"

View File

@@ -1,13 +1,10 @@
# ST Microelectronics STM32F302X8 MCU
# STMicroelectronics STM32F302X8 MCU
# Copyright (c) 2018 Seitz & Associates
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32F302X8
config SOC
default "stm32f302x8"
config NUM_IRQS
default 82

View File

@@ -1,14 +1,14 @@
# ST Microelectronics STM32F302XC MCU
# STMicroelectronics STM32F302XC MCU
# Copyright (c) 2022, SECO Spa
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32F302XC
config SOC
default "stm32f302xc"
config NUM_IRQS
default 82
config CPU_HAS_ARM_MPU
default y
endif # SOC_STM32F302XC

View File

@@ -1,4 +1,4 @@
# ST Microelectronics STM32F303XC MCU
# STMicroelectronics STM32F303XC MCU
# Copyright (c) 2016 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
@@ -7,10 +7,10 @@
# size differ).
if SOC_STM32F303XB || SOC_STM32F303XC
config SOC
default "stm32f303xc"
config NUM_IRQS
default 82
config CPU_HAS_ARM_MPU
default y
endif # SOC_STM32F303XB || SOC_STM32F303XC

View File

@@ -1,4 +1,4 @@
# ST Microelectronics STM32F303x8 MCU
# STMicroelectronics STM32F303x8 MCU
# Copyright (c) 2020 Sebastian Schwabe <sebastian.schwabe@mailbox.tu-dresden.de>
# Fabian Paschke <fabian.paschke@eas.iis.fraunhofer.de>
@@ -6,9 +6,6 @@
if SOC_STM32F303X8
config SOC
default "stm32f303x8"
config NUM_IRQS
default 82

View File

@@ -1,14 +1,14 @@
# ST Microelectronics STM32F303XC MCU
# STMicroelectronics STM32F303XC MCU
# Copyright (c) 2020 Paul M. Bendixen
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32F303XE
config SOC
default "stm32f303xe"
config NUM_IRQS
default 85
config CPU_HAS_ARM_MPU
default y
endif # SOC_STM32F303XE

View File

@@ -1,13 +1,10 @@
# ST Microelectronics STM32F334X8 MCU
# STMicroelectronics STM32F334X8 MCU
# Copyright (c) 2016 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32F334X8
config SOC
default "stm32f334x8"
config NUM_IRQS
default 82

View File

@@ -1,14 +1,14 @@
# ST Microelectronics STM32F373XC MCU
# STMicroelectronics STM32F373XC MCU
# Copyright (c) 2016 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32F373XC
config SOC
default "stm32f373xc"
config NUM_IRQS
default 82
config CPU_HAS_ARM_MPU
default y
endif # SOC_STM32F373XC

View File

@@ -0,0 +1,53 @@
# STMicroelectronics STM32F3 MCU line
# Copyright (c) 2016 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32F3X
bool
select SOC_FAMILY_STM32
config SOC_SERIES
default "stm32f3" if SOC_SERIES_STM32F3X
config SOC_STM32F302X8
bool
select SOC_SERIES_STM32F3X
config SOC_STM32F302XC
bool
select SOC_SERIES_STM32F3X
config SOC_STM32F303X8
bool
select SOC_SERIES_STM32F3X
config SOC_STM32F303XB
bool
select SOC_SERIES_STM32F3X
config SOC_STM32F303XC
bool
select SOC_SERIES_STM32F3X
config SOC_STM32F303XE
bool
select SOC_SERIES_STM32F3X
config SOC_STM32F334X8
bool
select SOC_SERIES_STM32F3X
config SOC_STM32F373XC
bool
select SOC_SERIES_STM32F3X
config SOC
default "stm32f302x8" if SOC_STM32F302X8
default "stm32f302xc" if SOC_STM32F302XC
default "stm32f303x8" if SOC_STM32F303X8
default "stm32f303xb" if SOC_STM32F303XB
default "stm32f303xc" if SOC_STM32F303XC
default "stm32f303xe" if SOC_STM32F303XE
default "stm32f334x8" if SOC_STM32F334X8
default "stm32f373xc" if SOC_STM32F373XC