diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.soc b/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.soc deleted file mode 100644 index c83a9962a60..00000000000 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.soc +++ /dev/null @@ -1,43 +0,0 @@ -# ST Microelectronics STM32F7 MCU line - -# Copyright (c) 2018 Yurii Hamann -# Copyright (c) 2022, Rtone. -# Copyright (c) 2023, Rahul Arasikere. -# Copyright (c) 2023 Evan Perry Grove -# SPDX-License-Identifier: Apache-2.0 - -choice - prompt "STM32F7x MCU Selection" - depends on SOC_SERIES_STM32F7X - -config SOC_STM32F722XX - bool "STM32F722XX" - -config SOC_STM32F723XX - bool "STM32F723XX" - -config SOC_STM32F745XX - bool "STM32F745XX" - -config SOC_STM32F746XX - bool "STM32F746XX" - -config SOC_STM32F756XX - bool "STM32F756XX" - -config SOC_STM32F750XX - bool "STM32F750XX" - -config SOC_STM32F765XX - bool "STM32F765XX" - select CPU_HAS_FPU_DOUBLE_PRECISION - -config SOC_STM32F767XX - bool "STM32F767XX" - select CPU_HAS_FPU_DOUBLE_PRECISION - -config SOC_STM32F769XX - bool "STM32F769XX" - select CPU_HAS_FPU_DOUBLE_PRECISION - -endchoice diff --git a/soc/st/stm32/soc.yml b/soc/st/stm32/soc.yml index dc5d3524121..f302607d0ab 100644 --- a/soc/st/stm32/soc.yml +++ b/soc/st/stm32/soc.yml @@ -42,3 +42,14 @@ family: - name: stm32f437xx - name: stm32f446xx - name: stm32f469xx + - name: stm32f7x + socs: + - name: stm32f722xx + - name: stm32f723xx + - name: stm32f745xx + - name: stm32f746xx + - name: stm32f750xx + - name: stm32f756xx + - name: stm32f765xx + - name: stm32f767xx + - name: stm32f769xx diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/CMakeLists.txt b/soc/st/stm32/stm32f7/CMakeLists.txt similarity index 87% rename from soc/soc_legacy/arm/st_stm32/stm32f7/CMakeLists.txt rename to soc/st/stm32/stm32f7/CMakeLists.txt index e02052e3946..eebd281cd96 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/CMakeLists.txt +++ b/soc/st/stm32/stm32f7/CMakeLists.txt @@ -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 "") diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.series b/soc/st/stm32/stm32f7/Kconfig similarity index 76% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.series rename to soc/st/stm32/stm32f7/Kconfig index a298fa2b579..1af203c4680 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.series +++ b/soc/st/stm32/stm32f7/Kconfig @@ -4,16 +4,12 @@ # SPDX-License-Identifier: Apache-2.0 config SOC_SERIES_STM32F7X - bool "STM32F7x Series MCU" select ARM select CPU_CORTEX_M7 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_FPU select CPU_HAS_ICACHE select CPU_HAS_DCACHE - select SOC_FAMILY_STM32 select HAS_STM32CUBE select CPU_HAS_ARM_MPU select HAS_SWO - help - Enable support for STM32F7 MCU series diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.series b/soc/st/stm32/stm32f7/Kconfig.defconfig similarity index 77% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.series rename to soc/st/stm32/stm32f7/Kconfig.defconfig index 3a5bc2d805c..3803fe103fe 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.series +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig @@ -7,7 +7,7 @@ if SOC_SERIES_STM32F7X -source "soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f7*" +rsource "Kconfig.defconfig.stm32f7*" config SOC_SERIES default "stm32f7" diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f722xx b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f722xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f722xx rename to soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f722xx index 5b85551f939..1ab0276fd91 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f722xx +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f722xx @@ -6,9 +6,6 @@ if SOC_STM32F722XX -config SOC - default "stm32f722xx" - config NUM_IRQS default 104 diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f723xx b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f723xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f723xx rename to soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f723xx index ff7db64ebec..e5195cf396e 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f723xx +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f723xx @@ -5,9 +5,6 @@ if SOC_STM32F723XX -config SOC - default "stm32f723xx" - config NUM_IRQS default 104 diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f745xx b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f745xx similarity index 85% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f745xx rename to soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f745xx index ec2b00093fc..83344e1fae4 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f745xx +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f745xx @@ -5,9 +5,6 @@ if SOC_STM32F745XX -config SOC - default "stm32f745xx" - config NUM_IRQS default 98 diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f746xx b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f746xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f746xx rename to soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f746xx index 11c00936039..a3024dbe00e 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f746xx +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f746xx @@ -5,9 +5,6 @@ if SOC_STM32F746XX -config SOC - default "stm32f746xx" - config NUM_IRQS default 98 diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f750xx b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f750xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f750xx rename to soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f750xx index d73314e11a4..1b228f95f57 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f750xx +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f750xx @@ -5,9 +5,6 @@ if SOC_STM32F750XX -config SOC - default "stm32f750xx" - config NUM_IRQS default 98 diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f756xx b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f756xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f756xx rename to soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f756xx index ff59bd3b9b5..e9f64abf7bb 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f756xx +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f756xx @@ -5,9 +5,6 @@ if SOC_STM32F756XX -config SOC - default "stm32f756xx" - config NUM_IRQS default 98 diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f765xx b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f765xx similarity index 75% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f765xx rename to soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f765xx index 37b8d537939..5f0ef8314d7 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f765xx +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f765xx @@ -5,10 +5,10 @@ if SOC_STM32F765XX -config SOC - default "stm32f765xx" - config NUM_IRQS - default 110 + default 100 + +config CPU_HAS_FPU_DOUBLE_PRECISION + default y endif # SOC_STM32F765XX diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f767xx b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f767xx similarity index 80% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f767xx rename to soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f767xx index e816a061933..f906cd30831 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f767xx +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f767xx @@ -5,10 +5,10 @@ if SOC_STM32F767XX -config SOC - default "stm32f767xx" - config NUM_IRQS default 110 +config CPU_HAS_FPU_DOUBLE_PRECISION + default y + endif # SOC_STM32F767XX diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f769xx b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f769xx similarity index 80% rename from soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f769xx rename to soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f769xx index 4b90ad5a659..9a709388c67 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f769xx +++ b/soc/st/stm32/stm32f7/Kconfig.defconfig.stm32f769xx @@ -5,10 +5,10 @@ if SOC_STM32F769XX -config SOC - default "stm32f769xx" - config NUM_IRQS default 110 +config CPU_HAS_FPU_DOUBLE_PRECISION + default y + endif # SOC_STM32F769XX diff --git a/soc/st/stm32/stm32f7/Kconfig.soc b/soc/st/stm32/stm32f7/Kconfig.soc new file mode 100644 index 00000000000..b9badd674a0 --- /dev/null +++ b/soc/st/stm32/stm32f7/Kconfig.soc @@ -0,0 +1,61 @@ +# ST Microelectronics STM32F7 MCU line + +# Copyright (c) 2018 Yurii Hamann +# Copyright (c) 2022, Rtone. +# Copyright (c) 2023, Rahul Arasikere. +# Copyright (c) 2023 Evan Perry Grove +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_STM32F7X + bool + select SOC_FAMILY_STM32 + +config SOC_SERIES + default "stm32f7" if SOC_SERIES_STM32F7X + +config SOC_STM32F722XX + bool + select SOC_SERIES_STM32F7X + +config SOC_STM32F723XX + bool + select SOC_SERIES_STM32F7X + +config SOC_STM32F745XX + bool + select SOC_SERIES_STM32F7X + +config SOC_STM32F746XX + bool + select SOC_SERIES_STM32F7X + +config SOC_STM32F756XX + bool + select SOC_SERIES_STM32F7X + +config SOC_STM32F750XX + bool + select SOC_SERIES_STM32F7X + +config SOC_STM32F765XX + bool + select SOC_SERIES_STM32F7X + +config SOC_STM32F767XX + bool + select SOC_SERIES_STM32F7X + +config SOC_STM32F769XX + bool + select SOC_SERIES_STM32F7X + +config SOC + default "stm32f722xx" if SOC_STM32F722XX + default "stm32f723xx" if SOC_STM32F723XX + default "stm32f745xx" if SOC_STM32F745XX + default "stm32f746xx" if SOC_STM32F746XX + default "stm32f750xx" if SOC_STM32F750XX + default "stm32f756xx" if SOC_STM32F756XX + default "stm32f765xx" if SOC_STM32F765XX + default "stm32f767xx" if SOC_STM32F767XX + default "stm32f769xx" if SOC_STM32F769XX diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/soc.c b/soc/st/stm32/stm32f7/soc.c similarity index 100% rename from soc/soc_legacy/arm/st_stm32/stm32f7/soc.c rename to soc/st/stm32/stm32f7/soc.c diff --git a/soc/soc_legacy/arm/st_stm32/stm32f7/soc.h b/soc/st/stm32/stm32f7/soc.h similarity index 100% rename from soc/soc_legacy/arm/st_stm32/stm32f7/soc.h rename to soc/st/stm32/stm32f7/soc.h