soc: v2: stm32: Migrate STM32L1 series

Port STM32L1 series to HW model V2

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
This commit is contained in:
Abderrahmane Jarmouni
2024-02-07 15:34:17 +01:00
committed by Jamie McCrae
parent cdb5364fd7
commit ce281f09ab
14 changed files with 54 additions and 73 deletions

View File

@@ -1,14 +0,0 @@
# ST Microelectronics STM32L151X8-A MCU
# Copyright (c) 2019 eTactica ehf
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32L151X8A
config SOC
default "stm32l151x8a"
config NUM_IRQS
default 45
endif # SOC_STM32L151X8A

View File

@@ -1,28 +0,0 @@
# ST Microelectronics STM32L1 MCU line
# Copyright (c) 2019 Linaro Ltd.
# SPDX-License-Identifier: Apache-2.0
choice
prompt "STM32L1x MCU Selection"
depends on SOC_SERIES_STM32L1X
config SOC_STM32L151X8A
bool "STM32L151X8A"
config SOC_STM32L151XB
bool "STM32L151XB"
config SOC_STM32L151XBA
bool "STM32L151XBA"
config SOC_STM32L151XC
bool "STM32L151XC"
config SOC_STM32L152XC
bool "STM32L152XC"
config SOC_STM32L152XE
bool "STM32L152XE"
endchoice

View File

@@ -53,3 +53,10 @@ family:
- name: stm32f765xx
- name: stm32f767xx
- name: stm32f769xx
- name: stm32l1x
socs:
- name: stm32l151xb
- name: stm32l151xba
- name: stm32l151xc
- name: stm32l152xc
- name: stm32l152xe

View File

@@ -3,4 +3,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 STM32L1 MCU series
# STMicroelectronics STM32L1 MCU series
# Copyright (c) 2019 Linaro Ltd.
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32L1X
bool "STM32L1x Series MCU"
select ARM
select CPU_CORTEX_M3
select CPU_CORTEX_M_HAS_DWT
select SOC_FAMILY_STM32
select HAS_STM32CUBE
select HAS_SWO
select CPU_HAS_ARM_MPU
help
Enable support for STM32L1 MCU series

View File

@@ -1,14 +1,11 @@
# ST Microelectronics STM32L1 MCU line
# STMicroelectronics STM32L1 MCU line
# Copyright (c) 2019 Linaro Ltd.
# SPDX-License-Identifier: Apache-2.0
if SOC_SERIES_STM32L1X
source "soc/soc_legacy/arm/st_stm32/stm32l1/Kconfig.defconfig.stm32l1*"
config SOC_SERIES
default "stm32l1"
rsource "Kconfig.defconfig.stm32l1*"
# adjust the fallback because of the LSI oscaillator characteristics
config TASK_WDT_HW_FALLBACK_DELAY

View File

@@ -1,13 +1,10 @@
# ST Microelectronics STM32L151XB MCU
# STMicroelectronics STM32L151XB MCU
# Copyright (c) 2019 Linaro Ltd.
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32L151XB
config SOC
default "stm32l151xb"
config NUM_IRQS
default 45

View File

@@ -1,13 +1,10 @@
# ST Microelectronics STM32L151XB-A MCU
# STMicroelectronics STM32L151XB-A MCU
# Copyright (c) 2019 Linaro Ltd.
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32L151XBA
config SOC
default "stm32l151xba"
config NUM_IRQS
default 45

View File

@@ -1,13 +1,10 @@
# ST Microelectronics STM32L151XC MCU
# STMicroelectronics STM32L151XC MCU
# Copyright (c) 2020 Abel Sensors
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32L151XC
config SOC
default "stm32l151xc"
# Based on stm32cube number of interrupts+1, not datasheet
config NUM_IRQS
default 57

View File

@@ -1,14 +1,10 @@
# ST Microelectronics STM32L152XC MCU
# STMicroelectronics STM32L152XC MCU
# Copyright (c) 2020 Abel Sensors
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32L152XC
config SOC
string
default "stm32l152xc"
config NUM_IRQS
int
default 57

View File

@@ -5,10 +5,6 @@
if SOC_STM32L152XE
config SOC
string
default "stm32l152xe"
config NUM_IRQS
int
default 57

View File

@@ -0,0 +1,38 @@
# STMicroelectronics STM32L1 MCU line
# Copyright (c) 2019 Linaro Ltd.
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32L1X
bool
select SOC_FAMILY_STM32
config SOC_SERIES
default "stm32l1" if SOC_SERIES_STM32L1X
config SOC_STM32L151XB
bool
select SOC_SERIES_STM32L1X
config SOC_STM32L151XBA
bool
select SOC_SERIES_STM32L1X
config SOC_STM32L151XC
bool
select SOC_SERIES_STM32L1X
config SOC_STM32L152XC
bool
select SOC_SERIES_STM32L1X
config SOC_STM32L152XE
bool
select SOC_SERIES_STM32L1X
config SOC
default "stm32l151xb" if SOC_STM32L151XB
default "stm32l151xba" if SOC_STM32L151XBA
default "stm32l151xc" if SOC_STM32L151XC
default "stm32l152xc" if SOC_STM32L152XC
default "stm32l152xe" if SOC_STM32L152XE