Browse Source

soc: st: stm32: Migrate STM32C0 series

Port STM32C0 series to HW model v2

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
pull/69687/head
Guillaume Gautier 1 year ago committed by Jamie McCrae
parent
commit
dbc5ed79f5
  1. 13
      soc/soc_legacy/arm/st_stm32/stm32c0/Kconfig.soc
  2. 3
      soc/st/stm32/soc.yml
  3. 2
      soc/st/stm32/stm32c0/CMakeLists.txt
  4. 4
      soc/st/stm32/stm32c0/Kconfig
  5. 5
      soc/st/stm32/stm32c0/Kconfig.defconfig
  6. 3
      soc/st/stm32/stm32c0/Kconfig.defconfig.stm32c031xx
  7. 18
      soc/st/stm32/stm32c0/Kconfig.soc
  8. 0
      soc/st/stm32/stm32c0/soc.c
  9. 0
      soc/st/stm32/stm32c0/soc.h

13
soc/soc_legacy/arm/st_stm32/stm32c0/Kconfig.soc

@ -1,13 +0,0 @@
# STMicroelectronics STM32C0 MCU line
# Copyright (c) 2023 Benjamin Björnsson <benjamin.bjornsson@gmail.com>
# SPDX-License-Identifier: Apache-2.0
choice
prompt "STM32C0x MCU Selection"
depends on SOC_SERIES_STM32C0X
config SOC_STM32C031XX
bool "STM32C031XX"
endchoice

3
soc/st/stm32/soc.yml

@ -1,6 +1,9 @@
family: family:
- name: st_stm32 - name: st_stm32
series: series:
- name: stm32c0x
socs:
- name: stm32c031xx
- name: stm32f0x - name: stm32f0x
socs: socs:
- name: stm32f030x6 - name: stm32f030x6

2
soc/soc_legacy/arm/st_stm32/stm32c0/CMakeLists.txt → soc/st/stm32/stm32c0/CMakeLists.txt

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

4
soc/soc_legacy/arm/st_stm32/stm32c0/Kconfig.series → soc/st/stm32/stm32c0/Kconfig

@ -4,13 +4,9 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32C0X config SOC_SERIES_STM32C0X
bool "STM32C0x Series MCU"
select ARM select ARM
select CPU_CORTEX_M0PLUS select CPU_CORTEX_M0PLUS
select CPU_CORTEX_M_HAS_VTOR select CPU_CORTEX_M_HAS_VTOR
select CPU_HAS_ARM_MPU select CPU_HAS_ARM_MPU
select SOC_FAMILY_STM32
select HAS_STM32CUBE select HAS_STM32CUBE
select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_SYSTICK
help
Enable support for STM32C0 MCU series

5
soc/soc_legacy/arm/st_stm32/stm32c0/Kconfig.defconfig.series → soc/st/stm32/stm32c0/Kconfig.defconfig

@ -5,9 +5,6 @@
if SOC_SERIES_STM32C0X if SOC_SERIES_STM32C0X
source "soc/soc_legacy/arm/st_stm32/stm32c0/Kconfig.defconfig.stm32c0*" rsource "Kconfig.defconfig.stm32c0*"
config SOC_SERIES
default "stm32c0"
endif # SOC_SERIES_STM32C0X endif # SOC_SERIES_STM32C0X

3
soc/soc_legacy/arm/st_stm32/stm32c0/Kconfig.defconfig.stm32c031xx → soc/st/stm32/stm32c0/Kconfig.defconfig.stm32c031xx

@ -5,9 +5,6 @@
if SOC_STM32C031XX if SOC_STM32C031XX
config SOC
default "stm32c031xx"
config NUM_IRQS config NUM_IRQS
default 29 default 29

18
soc/st/stm32/stm32c0/Kconfig.soc

@ -0,0 +1,18 @@
# STMicroelectronics STM32C0 MCU line
# Copyright (c) 2023 Benjamin Björnsson <benjamin.bjornsson@gmail.com>
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32C0X
bool
select SOC_FAMILY_STM32
config SOC_SERIES
default "stm32c0" if SOC_SERIES_STM32C0X
config SOC_STM32C031XX
bool
select SOC_SERIES_STM32C0X
config SOC
default "stm32c031xx" if SOC_STM32C031XX

0
soc/soc_legacy/arm/st_stm32/stm32c0/soc.c → soc/st/stm32/stm32c0/soc.c

0
soc/soc_legacy/arm/st_stm32/stm32c0/soc.h → soc/st/stm32/stm32c0/soc.h

Loading…
Cancel
Save