diff --git a/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.series b/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.series index 8cecc5e898..c83ba45913 100644 --- a/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.series +++ b/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.series @@ -12,16 +12,6 @@ source "arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f3*" config SOC_SERIES default stm32f3 -config SRAM_BASE_ADDRESS - default 0x20000000 - -config FLASH_BASE_ADDRESS - default 0x08000000 - -config NUM_IRQ_PRIO_BITS - int - default 4 - if WATCHDOG config IWDG_STM32 diff --git a/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f303xc b/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f303xc index 674a4a49d9..6feb4da214 100644 --- a/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f303xc +++ b/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f303xc @@ -11,12 +11,6 @@ config SOC string default stm32f303xc -config SRAM_SIZE - default 40 - -config FLASH_SIZE - default 256 - config FLASH_PAGE_SIZE hex default 0x800 diff --git a/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f334x8 b/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f334x8 index aa24810449..7ec8199384 100644 --- a/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f334x8 +++ b/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f334x8 @@ -11,12 +11,6 @@ config SOC string default stm32f334x8 -config SRAM_SIZE - default 12 - -config FLASH_SIZE - default 64 - config FLASH_PAGE_SIZE hex default 0x800 diff --git a/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f373xc b/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f373xc index 64aa9472d1..9e682b839f 100644 --- a/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f373xc +++ b/arch/arm/soc/st_stm32/stm32f3/Kconfig.defconfig.stm32f373xc @@ -11,12 +11,6 @@ config SOC string default stm32f373xc -config SRAM_SIZE - default 32 - -config FLASH_SIZE - default 256 - config FLASH_PAGE_SIZE hex default 0x800 diff --git a/boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig b/boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig index 948923d9f6..96d53aec55 100644 --- a/boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig +++ b/boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig @@ -23,7 +23,6 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_STM32=y # enable USART2 - passthrough to STLINK v2 connector CONFIG_UART_STM32_PORT_2=y -CONFIG_UART_STM32_PORT_2_BAUD_RATE=115200 # enable console on this port by default CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y @@ -55,3 +54,6 @@ CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9 CONFIG_CLOCK_STM32_AHB_PRESCALER=1 CONFIG_CLOCK_STM32_APB1_PRESCALER=2 CONFIG_CLOCK_STM32_APB2_PRESCALER=1 + +#enable DTS +CONFIG_HAS_DTS=y diff --git a/boards/arm/stm32373c_eval/stm32373c_eval_defconfig b/boards/arm/stm32373c_eval/stm32373c_eval_defconfig index d881b4e615..9df327b2b4 100644 --- a/boards/arm/stm32373c_eval/stm32373c_eval_defconfig +++ b/boards/arm/stm32373c_eval/stm32373c_eval_defconfig @@ -30,7 +30,6 @@ CONFIG_UART_STM32=y # enable USART2 - passthrough to STLINK v2 connector CONFIG_UART_STM32_PORT_2=y CONFIG_UART_STM32_PORT_2_NAME="UART_2" -CONFIG_UART_STM32_PORT_2_BAUD_RATE=115200 # enable console on this port by default CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y @@ -64,3 +63,6 @@ CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9 CONFIG_CLOCK_STM32_AHB_PRESCALER=1 CONFIG_CLOCK_STM32_APB1_PRESCALER=2 CONFIG_CLOCK_STM32_APB2_PRESCALER=2 + +#enable DTS +CONFIG_HAS_DTS=y diff --git a/dts/arm/Makefile b/dts/arm/Makefile index 9a1a500e16..0b93866566 100644 --- a/dts/arm/Makefile +++ b/dts/arm/Makefile @@ -12,6 +12,8 @@ dtb-$(CONFIG_BOARD_NUCLEO_F411RE) = nucleo_f411re.dts_compiled dtb-$(CONFIG_BOARD_NUCLEO_F103RB) = nucleo_f103rb.dts_compiled dtb-$(CONFIG_BOARD_STM3210C_EVAL) = stm3210c_eval.dts_compiled dtb-$(CONFIG_BOARD_STM32_MINI_A15) = stm32_mini_a15.dts_compiled +dtb-$(CONFIG_BOARD_NUCLEO_F334R8) = nucleo_f334r8.dts_compiled +dtb-$(CONFIG_BOARD_STM32373C_EVAL) = stm32373c_eval.dts_compiled always := $(dtb-y) endif diff --git a/dts/arm/nucleo_f334r8.fixup b/dts/arm/nucleo_f334r8.fixup new file mode 100644 index 0000000000..4b3ec44ea9 --- /dev/null +++ b/dts/arm/nucleo_f334r8.fixup @@ -0,0 +1,13 @@ +/* This file is a temporary workaround for mapping of the generated information + * to the current driver definitions. This will be removed when the drivers + * are modified to handle the generated information, or the mapping of + * generated data matches the driver definitions. + */ + + +#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS + +#define CONFIG_UART_STM32_PORT_2_BASE_ADDRESS ST_STM32_USART_40004400_BASE_ADDRESS +#define CONFIG_UART_STM32_PORT_2_BAUD_RATE ST_STM32_USART_40004400_BAUD_RATE +#define CONFIG_UART_STM32_PORT_2_IRQ_PRI ST_STM32_USART_40004400_IRQ_0_PRIORITY +#define PORT_2_IRQ ST_STM32_USART_40004400_IRQ_0 diff --git a/dts/arm/stm32373c_eval.fixup b/dts/arm/stm32373c_eval.fixup new file mode 100644 index 0000000000..4b3ec44ea9 --- /dev/null +++ b/dts/arm/stm32373c_eval.fixup @@ -0,0 +1,13 @@ +/* This file is a temporary workaround for mapping of the generated information + * to the current driver definitions. This will be removed when the drivers + * are modified to handle the generated information, or the mapping of + * generated data matches the driver definitions. + */ + + +#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS + +#define CONFIG_UART_STM32_PORT_2_BASE_ADDRESS ST_STM32_USART_40004400_BASE_ADDRESS +#define CONFIG_UART_STM32_PORT_2_BAUD_RATE ST_STM32_USART_40004400_BAUD_RATE +#define CONFIG_UART_STM32_PORT_2_IRQ_PRI ST_STM32_USART_40004400_IRQ_0_PRIORITY +#define PORT_2_IRQ ST_STM32_USART_40004400_IRQ_0