From 860094e89366bd6f714728e2e9c3de7517a91720 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 3 Dec 2023 01:32:27 +0800 Subject: [PATCH] [stm32] split stm32 drivers as normal and nano drivers - move all normal drivers (devices framework drivers) into drivers folder. - create nano folder for nano drivers nano drivers are only for a simply wrap of the HAL function, and not seek for adopting rt-thread devcies framework. - provide unified nano console and GPIO drivers. --- bsp/stm32/libraries/HAL_Drivers/SConscript | 121 +---------------- .../HAL_Drivers/{ => drivers}/Kconfig | 0 .../libraries/HAL_Drivers/drivers/SConscript | 125 ++++++++++++++++++ .../{ => drivers}/config/f0/adc_config.h | 0 .../{ => drivers}/config/f0/dma_config.h | 0 .../{ => drivers}/config/f0/pwm_config.h | 0 .../{ => drivers}/config/f0/spi_config.h | 0 .../{ => drivers}/config/f0/tim_config.h | 0 .../{ => drivers}/config/f0/uart_config.h | 0 .../{ => drivers}/config/f1/adc_config.h | 0 .../{ => drivers}/config/f1/dma_config.h | 0 .../config/f1/pulse_encoder_config.h | 0 .../{ => drivers}/config/f1/pwm_config.h | 0 .../{ => drivers}/config/f1/sdio_config.h | 0 .../{ => drivers}/config/f1/spi_config.h | 0 .../{ => drivers}/config/f1/tim_config.h | 0 .../{ => drivers}/config/f1/uart_config.h | 0 .../{ => drivers}/config/f1/usbd_config.h | 0 .../{ => drivers}/config/f2/adc_config.h | 0 .../{ => drivers}/config/f2/dma_config.h | 0 .../{ => drivers}/config/f2/pwm_config.h | 0 .../{ => drivers}/config/f2/sdio_config.h | 0 .../{ => drivers}/config/f2/spi_config.h | 0 .../{ => drivers}/config/f2/tim_config.h | 0 .../{ => drivers}/config/f2/uart_config.h | 0 .../{ => drivers}/config/f3/dma_config.h | 0 .../{ => drivers}/config/f3/pwm_config.h | 0 .../{ => drivers}/config/f3/tim_config.h | 0 .../{ => drivers}/config/f3/uart_config.h | 0 .../{ => drivers}/config/f4/adc_config.h | 0 .../{ => drivers}/config/f4/dac_config.h | 0 .../{ => drivers}/config/f4/dma_config.h | 0 .../config/f4/pulse_encoder_config.h | 0 .../{ => drivers}/config/f4/pwm_config.h | 0 .../{ => drivers}/config/f4/qspi_config.h | 0 .../{ => drivers}/config/f4/sdio_config.h | 0 .../{ => drivers}/config/f4/spi_config.h | 0 .../{ => drivers}/config/f4/tim_config.h | 0 .../{ => drivers}/config/f4/uart_config.h | 0 .../{ => drivers}/config/f4/usbd_config.h | 0 .../{ => drivers}/config/f7/adc_config.h | 0 .../{ => drivers}/config/f7/dma_config.h | 0 .../{ => drivers}/config/f7/pwm_config.h | 0 .../{ => drivers}/config/f7/qspi_config.h | 0 .../{ => drivers}/config/f7/sdio_config.h | 0 .../{ => drivers}/config/f7/spi_config.h | 0 .../{ => drivers}/config/f7/tim_config.h | 0 .../{ => drivers}/config/f7/uart_config.h | 0 .../{ => drivers}/config/g0/adc_config.h | 0 .../{ => drivers}/config/g0/dma_config.h | 0 .../{ => drivers}/config/g0/pwm_config.h | 0 .../{ => drivers}/config/g0/spi_config.h | 0 .../{ => drivers}/config/g0/tim_config.h | 0 .../{ => drivers}/config/g0/uart_config.h | 0 .../{ => drivers}/config/g4/adc_config.h | 0 .../{ => drivers}/config/g4/dma_config.h | 0 .../config/g4/pulse_encoder_config.h | 0 .../{ => drivers}/config/g4/pwm_config.h | 0 .../{ => drivers}/config/g4/qspi_config.h | 0 .../{ => drivers}/config/g4/sdio_config.h | 0 .../{ => drivers}/config/g4/spi_config.h | 0 .../{ => drivers}/config/g4/tim_config.h | 0 .../{ => drivers}/config/g4/uart_config.h | 0 .../{ => drivers}/config/g4/usbd_config.h | 0 .../{ => drivers}/config/h5/uart_config.h | 0 .../{ => drivers}/config/h7/adc_config.h | 0 .../{ => drivers}/config/h7/dac_config.h | 0 .../{ => drivers}/config/h7/dma_config.h | 0 .../{ => drivers}/config/h7/pwm_config.h | 0 .../{ => drivers}/config/h7/qspi_config.h | 0 .../{ => drivers}/config/h7/sdio_config.h | 0 .../{ => drivers}/config/h7/spi_config.h | 0 .../{ => drivers}/config/h7/tim_config.h | 0 .../{ => drivers}/config/h7/uart_config.h | 0 .../{ => drivers}/config/h7/usbd_config.h | 0 .../{ => drivers}/config/l0/dma_config.h | 0 .../{ => drivers}/config/l0/uart_config.h | 0 .../{ => drivers}/config/l1/adc_config.h | 0 .../{ => drivers}/config/l1/dma_config.h | 0 .../config/l1/pulse_encoder_config.h | 0 .../{ => drivers}/config/l1/pwm_config.h | 0 .../{ => drivers}/config/l1/sdio_config.h | 0 .../{ => drivers}/config/l1/spi_config.h | 0 .../{ => drivers}/config/l1/tim_config.h | 0 .../{ => drivers}/config/l1/uart_config.h | 0 .../{ => drivers}/config/l1/usbd_config.h | 0 .../{ => drivers}/config/l4/adc_config.h | 0 .../{ => drivers}/config/l4/dac_config.h | 0 .../{ => drivers}/config/l4/dma_config.h | 0 .../{ => drivers}/config/l4/pwm_config.h | 0 .../{ => drivers}/config/l4/qspi_config.h | 0 .../{ => drivers}/config/l4/sdio_config.h | 0 .../{ => drivers}/config/l4/spi_config.h | 0 .../{ => drivers}/config/l4/tim_config.h | 0 .../{ => drivers}/config/l4/uart_config.h | 0 .../{ => drivers}/config/l4/usbd_config.h | 0 .../{ => drivers}/config/l5/adc_config.h | 0 .../{ => drivers}/config/l5/dac_config.h | 0 .../{ => drivers}/config/l5/dma_config.h | 0 .../{ => drivers}/config/l5/pwm_config.h | 0 .../{ => drivers}/config/l5/qspi_config.h | 0 .../{ => drivers}/config/l5/sdio_config.h | 0 .../{ => drivers}/config/l5/spi_config.h | 0 .../{ => drivers}/config/l5/tim_config.h | 0 .../{ => drivers}/config/l5/uart_config.h | 0 .../{ => drivers}/config/l5/usbd_config.h | 0 .../{ => drivers}/config/mp1/adc_config.h | 0 .../{ => drivers}/config/mp1/dac_config.h | 0 .../{ => drivers}/config/mp1/dma_config.h | 0 .../{ => drivers}/config/mp1/pwm_config.h | 0 .../{ => drivers}/config/mp1/qspi_config.h | 0 .../{ => drivers}/config/mp1/spi_config.h | 0 .../{ => drivers}/config/mp1/tim_config.h | 0 .../{ => drivers}/config/mp1/uart_config.h | 0 .../{ => drivers}/config/u5/adc_config.h | 0 .../{ => drivers}/config/u5/dac_config.h | 0 .../{ => drivers}/config/u5/dma_config.h | 0 .../{ => drivers}/config/u5/pwm_config.h | 0 .../{ => drivers}/config/u5/qspi_config.h | 0 .../{ => drivers}/config/u5/sdio_config.h | 0 .../{ => drivers}/config/u5/spi_config.h | 0 .../{ => drivers}/config/u5/tim_config.h | 0 .../{ => drivers}/config/u5/uart_config.h | 0 .../{ => drivers}/config/u5/usbd_config.h | 0 .../{ => drivers}/config/wb/adc_config.h | 0 .../{ => drivers}/config/wb/dma_config.h | 0 .../{ => drivers}/config/wb/pwm_config.h | 0 .../{ => drivers}/config/wb/qspi_config.h | 0 .../{ => drivers}/config/wb/spi_config.h | 0 .../{ => drivers}/config/wb/tim_config.h | 0 .../{ => drivers}/config/wb/uart_config.h | 0 .../{ => drivers}/config/wb/usbd_config.h | 0 .../{ => drivers}/config/wl/dma_config.h | 0 .../{ => drivers}/config/wl/spi_config.h | 0 .../{ => drivers}/config/wl/tim_config.h | 0 .../{ => drivers}/config/wl/uart_config.h | 0 .../HAL_Drivers/{ => drivers}/drv_adc.c | 0 .../HAL_Drivers/{ => drivers}/drv_can.c | 0 .../HAL_Drivers/{ => drivers}/drv_can.h | 0 .../HAL_Drivers/{ => drivers}/drv_config.h | 0 .../HAL_Drivers/{ => drivers}/drv_crypto.c | 0 .../HAL_Drivers/{ => drivers}/drv_crypto.h | 0 .../HAL_Drivers/{ => drivers}/drv_dac.c | 0 .../HAL_Drivers/{ => drivers}/drv_dma.h | 0 .../HAL_Drivers/{ => drivers}/drv_eth.c | 0 .../HAL_Drivers/{ => drivers}/drv_eth.h | 0 .../{ => drivers}/drv_flash/drv_flash.h | 0 .../{ => drivers}/drv_flash/drv_flash_f0.c | 0 .../{ => drivers}/drv_flash/drv_flash_f1.c | 0 .../{ => drivers}/drv_flash/drv_flash_f2.c | 0 .../{ => drivers}/drv_flash/drv_flash_f4.c | 0 .../{ => drivers}/drv_flash/drv_flash_f7.c | 0 .../{ => drivers}/drv_flash/drv_flash_g0.c | 0 .../{ => drivers}/drv_flash/drv_flash_h7.c | 0 .../{ => drivers}/drv_flash/drv_flash_l4.c | 0 .../{ => drivers}/drv_flash/drv_flash_wb.c | 0 .../HAL_Drivers/{ => drivers}/drv_gpio.c | 7 +- .../HAL_Drivers/{ => drivers}/drv_gpio.h | 0 .../HAL_Drivers/{ => drivers}/drv_lcd.c | 0 .../HAL_Drivers/{ => drivers}/drv_lcd_mipi.c | 0 .../HAL_Drivers/{ => drivers}/drv_log.h | 0 .../HAL_Drivers/{ => drivers}/drv_lptim.c | 0 .../HAL_Drivers/{ => drivers}/drv_lptim.h | 0 .../HAL_Drivers/{ => drivers}/drv_nand.c | 0 .../HAL_Drivers/{ => drivers}/drv_nand.h | 0 .../HAL_Drivers/{ => drivers}/drv_pm.c | 0 .../{ => drivers}/drv_pulse_encoder.c | 0 .../HAL_Drivers/{ => drivers}/drv_pwm.c | 0 .../HAL_Drivers/{ => drivers}/drv_qspi.c | 0 .../HAL_Drivers/{ => drivers}/drv_qspi.h | 0 .../HAL_Drivers/{ => drivers}/drv_rtc.c | 0 .../HAL_Drivers/{ => drivers}/drv_sdio.c | 0 .../HAL_Drivers/{ => drivers}/drv_sdio.h | 0 .../HAL_Drivers/{ => drivers}/drv_sdmmc.c | 0 .../HAL_Drivers/{ => drivers}/drv_sdmmc.h | 0 .../HAL_Drivers/{ => drivers}/drv_sdram.c | 0 .../HAL_Drivers/{ => drivers}/drv_soft_i2c.c | 0 .../HAL_Drivers/{ => drivers}/drv_soft_i2c.h | 0 .../HAL_Drivers/{ => drivers}/drv_soft_spi.c | 0 .../HAL_Drivers/{ => drivers}/drv_soft_spi.h | 0 .../HAL_Drivers/{ => drivers}/drv_spi.c | 0 .../HAL_Drivers/{ => drivers}/drv_spi.h | 0 .../HAL_Drivers/{ => drivers}/drv_tim.c | 0 .../HAL_Drivers/{ => drivers}/drv_tim.h | 0 .../HAL_Drivers/{ => drivers}/drv_usart.c | 0 .../HAL_Drivers/{ => drivers}/drv_usart.h | 0 .../HAL_Drivers/{ => drivers}/drv_usart_v2.c | 0 .../HAL_Drivers/{ => drivers}/drv_usart_v2.h | 0 .../HAL_Drivers/{ => drivers}/drv_usbd.c | 0 .../HAL_Drivers/{ => drivers}/drv_usbh.c | 0 .../HAL_Drivers/{ => drivers}/drv_usbh.h | 0 .../HAL_Drivers/{ => drivers}/drv_wdt.c | 0 bsp/stm32/libraries/HAL_Drivers/drv_common.c | 8 +- bsp/stm32/libraries/HAL_Drivers/drv_common.h | 3 +- .../libraries/HAL_Drivers/nano/SConscript | 15 +++ .../libraries/HAL_Drivers/nano/drv_console.c | 106 +++++++++++++++ .../libraries/HAL_Drivers/nano/drv_gpio.c | 124 +++++++++++++++++ .../libraries/HAL_Drivers/nano/drv_gpio.h | 39 ++++++ bsp/stm32/libraries/STM32F0xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32F1xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32F2xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32F3xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32F4xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32F7xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32G0xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32G4xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32H5xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32H7xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32L0xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32L1xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32L5xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32MPxx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32U5xx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32WBxx_HAL/SConscript | 2 +- bsp/stm32/libraries/STM32WLxx_HAL/SConscript | 2 +- .../libraries/templates/stm32f0xx/Kconfig | 4 +- .../templates/stm32f0xx/board/Kconfig | 2 +- .../libraries/templates/stm32f10x/Kconfig | 5 +- .../templates/stm32f10x/board/Kconfig | 2 +- .../libraries/templates/stm32f2xx/Kconfig | 4 +- .../templates/stm32f2xx/board/Kconfig | 2 +- .../libraries/templates/stm32f3xx/Kconfig | 3 + .../libraries/templates/stm32f4xx/Kconfig | 3 + .../templates/stm32f4xx/board/Kconfig | 2 +- .../libraries/templates/stm32f7xx/Kconfig | 3 + .../templates/stm32f7xx/board/Kconfig | 2 +- .../libraries/templates/stm32h7xx/Kconfig | 3 + .../templates/stm32h7xx/board/Kconfig | 2 +- .../libraries/templates/stm32l1xx/Kconfig | 5 +- .../templates/stm32l1xx/board/Kconfig | 2 +- .../libraries/templates/stm32l4xx/Kconfig | 3 + .../templates/stm32l4xx/board/Kconfig | 2 +- .../libraries/templates/stm32l5xx/Kconfig | 3 + .../templates/stm32l5xx/board/Kconfig | 2 +- .../libraries/templates/stm32mp1xx/Kconfig | 5 +- .../templates/stm32mp1xx/board/Kconfig | 2 +- .../libraries/templates/stm32wbxx/Kconfig | 3 + .../templates/stm32wbxx/board/Kconfig | 2 +- .../libraries/templates/stm32xx_board_Kconfig | 2 +- tools/mkdist.py | 6 +- 240 files changed, 498 insertions(+), 158 deletions(-) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/Kconfig (100%) create mode 100644 bsp/stm32/libraries/HAL_Drivers/drivers/SConscript rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f0/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f0/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f0/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f0/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f0/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f0/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f1/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f1/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f1/pulse_encoder_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f1/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f1/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f1/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f1/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f1/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f1/usbd_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f2/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f2/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f2/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f2/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f2/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f2/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f2/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f3/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f3/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f3/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f3/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/dac_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/pulse_encoder_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/qspi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f4/usbd_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f7/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f7/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f7/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f7/qspi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f7/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f7/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f7/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/f7/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g0/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g0/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g0/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g0/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g0/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g0/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/pulse_encoder_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/qspi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/g4/usbd_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h5/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/dac_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/qspi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/h7/usbd_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l0/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l0/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l1/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l1/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l1/pulse_encoder_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l1/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l1/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l1/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l1/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l1/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l1/usbd_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/dac_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/qspi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l4/usbd_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/dac_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/qspi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/l5/usbd_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/mp1/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/mp1/dac_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/mp1/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/mp1/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/mp1/qspi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/mp1/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/mp1/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/mp1/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/dac_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/qspi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/sdio_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/u5/usbd_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wb/adc_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wb/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wb/pwm_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wb/qspi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wb/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wb/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wb/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wb/usbd_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wl/dma_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wl/spi_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wl/tim_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/config/wl/uart_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_adc.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_can.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_can.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_config.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_crypto.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_crypto.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_dac.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_dma.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_eth.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_eth.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash_f0.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash_f1.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash_f2.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash_f4.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash_f7.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash_g0.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash_h7.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash_l4.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_flash/drv_flash_wb.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_gpio.c (99%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_gpio.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_lcd.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_lcd_mipi.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_log.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_lptim.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_lptim.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_nand.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_nand.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_pm.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_pulse_encoder.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_pwm.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_qspi.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_qspi.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_rtc.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_sdio.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_sdio.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_sdmmc.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_sdmmc.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_sdram.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_soft_i2c.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_soft_i2c.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_soft_spi.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_soft_spi.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_spi.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_spi.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_tim.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_tim.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_usart.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_usart.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_usart_v2.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_usart_v2.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_usbd.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_usbh.c (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_usbh.h (100%) rename bsp/stm32/libraries/HAL_Drivers/{ => drivers}/drv_wdt.c (100%) create mode 100644 bsp/stm32/libraries/HAL_Drivers/nano/SConscript create mode 100644 bsp/stm32/libraries/HAL_Drivers/nano/drv_console.c create mode 100644 bsp/stm32/libraries/HAL_Drivers/nano/drv_gpio.c create mode 100644 bsp/stm32/libraries/HAL_Drivers/nano/drv_gpio.h diff --git a/bsp/stm32/libraries/HAL_Drivers/SConscript b/bsp/stm32/libraries/HAL_Drivers/SConscript index a3380da81f..874a65a467 100644 --- a/bsp/stm32/libraries/HAL_Drivers/SConscript +++ b/bsp/stm32/libraries/HAL_Drivers/SConscript @@ -1,6 +1,7 @@ Import('RTT_ROOT') Import('rtconfig') from building import * +import os cwd = GetCurrentDir() group = [] @@ -8,121 +9,13 @@ src = ['drv_common.c'] path = [cwd] if not GetDepend('PKG_CMSIS_CORE'): - path += [cwd + '/CMSIS/Include'] + path += [os.path.join(cwd, 'CMSIS', 'Include')] -if not GetDepend(['RT_USING_NANO']): - if GetDepend(['RT_USING_PIN']): - src += ['drv_gpio.c'] +if GetDepend(['RT_USING_NANO']): + group = group + SConscript(os.path.join(cwd, 'nano', 'SConscript')) +else: + group = group + SConscript(os.path.join(cwd, 'drivers', 'SConscript')) - if GetDepend(['RT_USING_SERIAL']): - if GetDepend(['RT_USING_SERIAL_V2']): - src += ['drv_usart_v2.c'] - else: - src += ['drv_usart.c'] - - if GetDepend(['BSP_USING_TIM']): - src += ['drv_tim.c'] - - if GetDepend(['BSP_USING_PWM']): - src += ['drv_pwm.c', 'drv_tim.c'] - - if GetDepend(['RT_USING_SPI']): - src += ['drv_spi.c'] - - if GetDepend(['RT_USING_QSPI']): - src += ['drv_qspi.c'] - - if GetDepend('RT_USING_SPI_BITOPS'): - src += ['drv_soft_spi.c'] - - if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']): - if GetDepend('BSP_USING_I2C1') or GetDepend('BSP_USING_I2C2') or GetDepend('BSP_USING_I2C3') or GetDepend('BSP_USING_I2C4'): - src += ['drv_soft_i2c.c'] - - if GetDepend(['BSP_USING_ETH', 'RT_USING_LWIP']): - src += ['drv_eth.c'] - - if GetDepend(['RT_USING_ADC']): - src += ['drv_adc.c'] - - if GetDepend(['RT_USING_DAC']): - src += ['drv_dac.c'] - - if GetDepend(['RT_USING_CAN']): - src += ['drv_can.c'] - - if GetDepend(['RT_USING_PM', 'SOC_SERIES_STM32L4']): - src += ['drv_pm.c'] - src += ['drv_lptim.c'] - - if GetDepend('BSP_USING_SDRAM'): - src += ['drv_sdram.c'] - - if GetDepend(['BSP_USING_NAND1']): - src += ['drv_nand.c'] - - if GetDepend('BSP_USING_LCD'): - src += ['drv_lcd.c'] - - if GetDepend('BSP_USING_LCD_MIPI'): - src += ['drv_lcd_mipi.c'] - - if GetDepend('BSP_USING_ONCHIP_RTC'): - src += ['drv_rtc.c'] - - if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32G0']): - src += ['drv_flash/drv_flash_g0.c'] - - if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F0']): - src += ['drv_flash/drv_flash_f0.c'] - - if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F1']): - src += ['drv_flash/drv_flash_f1.c'] - - if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F2']): - src += ['drv_flash/drv_flash_f2.c'] - - if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F4']): - src += ['drv_flash/drv_flash_f4.c'] - - if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F7']): - src += ['drv_flash/drv_flash_f7.c'] - - if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32L4']): - src += ['drv_flash/drv_flash_l4.c'] - - if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32H7']): - src += ['drv_flash/drv_flash_h7.c'] - - if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32WB']): - src += ['drv_flash/drv_flash_wb.c'] - - if GetDepend('RT_USING_HWCRYPTO'): - src += ['drv_crypto.c'] - - if GetDepend(['BSP_USING_WDT']): - src += ['drv_wdt.c'] - - if GetDepend(['BSP_USING_SDIO']): - if GetDepend('SOC_SERIES_STM32H7') or GetDepend('SOC_SERIES_STM32F7') or GetDepend('SOC_SERIES_STM32L4') or GetDepend('SOC_SERIES_STM32L5'): - src += ['drv_sdmmc.c'] - else: - src += ['drv_sdio.c'] - - if GetDepend(['BSP_USING_USBD']): - src += ['drv_usbd.c'] - - if GetDepend(['BSP_USING_PULSE_ENCODER']): - src += ['drv_pulse_encoder.c'] - - if GetDepend(['BSP_USING_USBH']): - src += ['drv_usbh.c'] - - path += [cwd + '/config'] - - if GetDepend('BSP_USING_ON_CHIP_FLASH'): - path += [cwd + '/drv_flash'] - -group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path) +group = group + DefineGroup('Drivers', src, depend = [''], CPPPATH = path) Return('group') diff --git a/bsp/stm32/libraries/HAL_Drivers/Kconfig b/bsp/stm32/libraries/HAL_Drivers/drivers/Kconfig similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/Kconfig rename to bsp/stm32/libraries/HAL_Drivers/drivers/Kconfig diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/SConscript b/bsp/stm32/libraries/HAL_Drivers/drivers/SConscript new file mode 100644 index 0000000000..8e5cc4efa3 --- /dev/null +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/SConscript @@ -0,0 +1,125 @@ +Import('RTT_ROOT') +Import('rtconfig') +from building import * +import os + +cwd = GetCurrentDir() +group = [] +src = [] +path = [cwd] + +if GetDepend(['RT_USING_PIN']): + src += ['drv_gpio.c'] + +if GetDepend(['RT_USING_SERIAL']): + if GetDepend(['RT_USING_SERIAL_V2']): + src += ['drv_usart_v2.c'] + else: + src += ['drv_usart.c'] + +if GetDepend(['BSP_USING_TIM']): + src += ['drv_tim.c'] + +if GetDepend(['BSP_USING_PWM']): + src += ['drv_pwm.c', 'drv_tim.c'] + +if GetDepend(['RT_USING_SPI']): + src += ['drv_spi.c'] + +if GetDepend(['RT_USING_QSPI']): + src += ['drv_qspi.c'] + +if GetDepend('RT_USING_SPI_BITOPS'): + src += ['drv_soft_spi.c'] + +if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']): + if GetDepend('BSP_USING_I2C1') or GetDepend('BSP_USING_I2C2') or GetDepend('BSP_USING_I2C3') or GetDepend('BSP_USING_I2C4'): + src += ['drv_soft_i2c.c'] + +if GetDepend(['BSP_USING_ETH', 'RT_USING_LWIP']): + src += ['drv_eth.c'] + +if GetDepend(['RT_USING_ADC']): + src += ['drv_adc.c'] + +if GetDepend(['RT_USING_DAC']): + src += ['drv_dac.c'] + +if GetDepend(['RT_USING_CAN']): + src += ['drv_can.c'] + +if GetDepend(['RT_USING_PM', 'SOC_SERIES_STM32L4']): + src += ['drv_pm.c'] + src += ['drv_lptim.c'] + +if GetDepend('BSP_USING_SDRAM'): + src += ['drv_sdram.c'] + +if GetDepend(['BSP_USING_NAND1']): + src += ['drv_nand.c'] + +if GetDepend('BSP_USING_LCD'): + src += ['drv_lcd.c'] + +if GetDepend('BSP_USING_LCD_MIPI'): + src += ['drv_lcd_mipi.c'] + +if GetDepend('BSP_USING_ONCHIP_RTC'): + src += ['drv_rtc.c'] + +if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32G0']): + src += [os.path.join('drv_flash', 'drv_flash_g0.c')] + +if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F0']): + src += [os.path.join('drv_flash', 'drv_flash_f0.c')] + +if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F1']): + src += [os.path.join('drv_flash', 'drv_flash_f1.c')] + +if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F2']): + src += [os.path.join('drv_flash', 'drv_flash_f2.c')] + +if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F4']): + src += [os.path.join('drv_flash', 'drv_flash_f4.c')] + +if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32F7']): + src += [os.path.join('drv_flash', 'drv_flash_f7.c')] + +if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32L4']): + src += [os.path.join('drv_flash', 'drv_flash_l4.c')] + +if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32H7']): + src += [os.path.join('drv_flash', 'drv_flash_h7.c')] + +if GetDepend(['BSP_USING_ON_CHIP_FLASH', 'SOC_SERIES_STM32WB']): + src += [os.path.join('drv_flash', 'drv_flash_wb.c')] + +if GetDepend('RT_USING_HWCRYPTO'): + src += ['drv_crypto.c'] + +if GetDepend(['BSP_USING_WDT']): + src += ['drv_wdt.c'] + +if GetDepend(['BSP_USING_SDIO']): + if GetDepend('SOC_SERIES_STM32H7') or GetDepend('SOC_SERIES_STM32F7') or GetDepend('SOC_SERIES_STM32L4') or GetDepend('SOC_SERIES_STM32L5'): + src += ['drv_sdmmc.c'] + else: + src += ['drv_sdio.c'] + +if GetDepend(['BSP_USING_USBD']): + src += ['drv_usbd.c'] + +if GetDepend(['BSP_USING_PULSE_ENCODER']): + src += ['drv_pulse_encoder.c'] + +if GetDepend(['BSP_USING_USBH']): + src += ['drv_usbh.c'] + +path += [os.path.join(cwd, 'config')] + +if GetDepend('BSP_USING_ON_CHIP_FLASH'): + path += [os.path.join(cwd, 'drv_flash')] + +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path) + +Return('group') diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f0/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f0/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f0/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f0/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f0/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f0/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f0/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f0/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f0/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f0/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f0/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f0/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f0/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f1/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f1/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/pulse_encoder_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/pulse_encoder_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f1/pulse_encoder_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/pulse_encoder_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f1/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f1/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f1/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f1/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/usbd_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/usbd_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f1/usbd_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f1/usbd_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f2/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f2/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f2/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f2/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f2/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f2/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f2/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f2/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f2/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f2/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f2/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f2/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f2/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f2/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f2/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f3/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f3/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f3/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f3/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f3/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f3/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f3/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f3/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f3/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f3/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f3/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f3/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f3/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f3/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f3/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f3/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/dac_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/dac_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/dac_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/dac_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/pulse_encoder_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/pulse_encoder_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/pulse_encoder_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/pulse_encoder_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/qspi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/qspi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/qspi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/qspi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/usbd_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/usbd_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f4/usbd_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f4/usbd_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f7/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f7/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f7/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/qspi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/qspi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f7/qspi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/qspi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f7/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f7/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f7/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/f7/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/f7/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g0/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g0/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g0/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g0/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g0/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g0/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g0/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g0/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g0/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g0/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g0/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g0/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g0/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/pulse_encoder_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/pulse_encoder_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/pulse_encoder_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/pulse_encoder_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/qspi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/qspi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/qspi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/qspi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/g4/usbd_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/usbd_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/g4/usbd_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/g4/usbd_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h5/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h5/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h5/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h5/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/dac_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/dac_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/dac_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/dac_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/qspi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/qspi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/qspi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/qspi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/h7/usbd_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/usbd_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/h7/usbd_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/h7/usbd_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l0/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l0/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l0/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l0/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l0/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l0/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l0/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l0/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l1/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l1/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/pulse_encoder_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/pulse_encoder_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l1/pulse_encoder_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/pulse_encoder_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l1/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l1/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l1/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l1/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l1/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l1/usbd_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/usbd_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l1/usbd_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l1/usbd_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/dac_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/dac_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/dac_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/dac_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/qspi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/qspi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/qspi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/qspi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l4/usbd_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/usbd_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l4/usbd_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/usbd_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/dac_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/dac_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/dac_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/dac_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/qspi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/qspi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/qspi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/qspi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/l5/usbd_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/usbd_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/l5/usbd_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/l5/usbd_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/mp1/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/mp1/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/mp1/dac_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/dac_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/mp1/dac_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/dac_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/mp1/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/mp1/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/mp1/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/mp1/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/mp1/qspi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/qspi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/mp1/qspi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/qspi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/mp1/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/mp1/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/mp1/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/mp1/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/mp1/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/mp1/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/mp1/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/dac_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/dac_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/dac_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/dac_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/qspi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/qspi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/qspi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/qspi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/sdio_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/sdio_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/sdio_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/sdio_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/u5/usbd_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/usbd_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/u5/usbd_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/u5/usbd_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wb/adc_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/adc_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wb/adc_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/adc_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wb/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wb/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wb/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/pwm_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wb/pwm_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/pwm_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wb/qspi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/qspi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wb/qspi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/qspi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wb/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wb/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wb/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wb/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wb/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wb/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wb/usbd_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/usbd_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wb/usbd_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wb/usbd_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wl/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wl/dma_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wl/dma_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wl/dma_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wl/spi_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wl/spi_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wl/spi_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wl/spi_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wl/tim_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wl/tim_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wl/tim_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wl/tim_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/config/wl/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/config/wl/uart_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/config/wl/uart_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/config/wl/uart_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_adc.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_adc.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_adc.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_adc.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_can.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_can.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_can.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_can.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_can.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_can.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_can.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_can.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_config.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_config.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_config.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_crypto.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_crypto.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_crypto.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_crypto.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_crypto.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_crypto.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_crypto.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_crypto.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_dac.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_dac.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_dac.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_dac.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_dma.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_dma.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_dma.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_dma.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_eth.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_eth.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_eth.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_eth.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_eth.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_eth.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_eth.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_eth.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f0.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f0.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f0.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f0.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f1.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f1.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f2.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f2.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f2.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f2.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f4.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f4.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f7.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f7.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f7.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f7.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_g0.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_g0.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_g0.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_g0.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_h7.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_h7.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_h7.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_h7.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_l4.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_l4.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_wb.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_wb.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_wb.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_wb.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_gpio.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_gpio.c similarity index 99% rename from bsp/stm32/libraries/HAL_Drivers/drv_gpio.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_gpio.c index f55162b400..072e272e13 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_gpio.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_gpio.c @@ -66,7 +66,7 @@ #define PIN_STPORT_MAX __STM32_PORT_MAX static const struct pin_irq_map pin_irq_map[] = - { +{ #if defined(SOC_SERIES_STM32F0) || defined(SOC_SERIES_STM32L0) || defined(SOC_SERIES_STM32G0) {GPIO_PIN_0, EXTI0_1_IRQn}, {GPIO_PIN_1, EXTI0_1_IRQn}, @@ -139,7 +139,7 @@ static const struct pin_irq_map pin_irq_map[] = }; static struct rt_pin_irq_hdr pin_irq_hdr_tab[] = - { +{ {-1, 0, RT_NULL, RT_NULL}, {-1, 0, RT_NULL, RT_NULL}, {-1, 0, RT_NULL, RT_NULL}, @@ -245,7 +245,6 @@ static void stm32_pin_mode(rt_device_t dev, rt_base_t pin, rt_uint8_t mode) /* Configure GPIO_InitStructure */ GPIO_InitStruct.Pin = PIN_STPIN(pin); GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; if (mode == PIN_MODE_OUTPUT) @@ -503,7 +502,7 @@ static rt_err_t stm32_pin_irq_enable(struct rt_device *device, rt_base_t pin, return RT_EOK; } static const struct rt_pin_ops _stm32_pin_ops = - { +{ stm32_pin_mode, stm32_pin_write, stm32_pin_read, diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_gpio.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_gpio.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_gpio.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_gpio.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_lcd.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_lcd.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_lcd.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_lcd.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_lcd_mipi.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_lcd_mipi.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_lcd_mipi.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_lcd_mipi.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_log.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_log.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_log.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_log.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_lptim.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_lptim.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_lptim.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_lptim.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_lptim.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_lptim.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_lptim.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_lptim.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_nand.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_nand.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_nand.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_nand.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_nand.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_nand.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_nand.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_nand.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_pm.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_pm.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_pm.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_pm.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_pulse_encoder.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_pulse_encoder.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_pulse_encoder.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_pulse_encoder.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_pwm.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_pwm.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_pwm.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_pwm.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_qspi.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_qspi.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_qspi.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_qspi.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_qspi.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_qspi.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_qspi.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_qspi.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_rtc.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_rtc.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_rtc.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_rtc.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_sdio.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdio.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_sdio.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdio.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_sdio.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdio.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_sdio.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdio.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_sdmmc.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdmmc.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_sdmmc.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdmmc.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_sdmmc.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdmmc.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_sdmmc.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdmmc.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_sdram.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdram.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_sdram.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_sdram.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_soft_i2c.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_i2c.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_soft_i2c.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_i2c.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_soft_i2c.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_i2c.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_soft_i2c.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_i2c.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_soft_spi.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_spi.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_soft_spi.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_spi.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_soft_spi.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_spi.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_soft_spi.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_spi.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_spi.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_spi.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_spi.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_spi.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_spi.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_spi.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_spi.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_spi.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_tim.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_tim.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_tim.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_tim.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_tim.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_tim.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_tim.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_tim.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usart.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_usart.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usart.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_usart.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usart_v2.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart_v2.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_usart_v2.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart_v2.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usart_v2.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart_v2.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_usart_v2.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart_v2.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usbd.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbd.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_usbd.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbd.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usbh.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbh.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_usbh.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbh.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usbh.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbh.h similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_usbh.h rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbh.h diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_wdt.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_wdt.c similarity index 100% rename from bsp/stm32/libraries/HAL_Drivers/drv_wdt.c rename to bsp/stm32/libraries/HAL_Drivers/drivers/drv_wdt.c diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_common.c b/bsp/stm32/libraries/HAL_Drivers/drv_common.c index 79be007436..fa5b806250 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_common.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_common.c @@ -11,11 +11,15 @@ #include "drv_common.h" #include +#ifdef RT_USING_PIN +#include +#endif + #ifdef RT_USING_SERIAL #ifdef RT_USING_SERIAL_V2 -#include "drv_usart_v2.h" +#include #else -#include "drv_usart.h" +#include #endif /* RT_USING_SERIAL */ #endif /* RT_USING_SERIAL_V2 */ diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_common.h b/bsp/stm32/libraries/HAL_Drivers/drv_common.h index 4b9e87aee2..5c74647290 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_common.h +++ b/bsp/stm32/libraries/HAL_Drivers/drv_common.h @@ -11,8 +11,9 @@ #ifndef __DRV_COMMON_H__ #define __DRV_COMMON_H__ -#include #include +#include +#include #ifdef RT_USING_DEVICE #include #endif /* RT_USING_DEVICE */ diff --git a/bsp/stm32/libraries/HAL_Drivers/nano/SConscript b/bsp/stm32/libraries/HAL_Drivers/nano/SConscript new file mode 100644 index 0000000000..99695defbc --- /dev/null +++ b/bsp/stm32/libraries/HAL_Drivers/nano/SConscript @@ -0,0 +1,15 @@ +Import('RTT_ROOT') +Import('rtconfig') +from building import * + +cwd = GetCurrentDir() +group = [] +src = ['drv_gpio.c'] +path = [cwd] + +if GetDepend(['RT_USING_CONSOLE']): + src += ['drv_console.c'] + +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path) + +Return('group') diff --git a/bsp/stm32/libraries/HAL_Drivers/nano/drv_console.c b/bsp/stm32/libraries/HAL_Drivers/nano/drv_console.c new file mode 100644 index 0000000000..8090ae44ba --- /dev/null +++ b/bsp/stm32/libraries/HAL_Drivers/nano/drv_console.c @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-11-30 Meco Man First version + */ + +#include +#include +#include + +static UART_HandleTypeDef console_uart; + +void rt_hw_console_init(void) +{ + HAL_UART_DeInit(&console_uart); +#ifdef USART1 + if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "uart1") == 0) + { + console_uart.Instance = USART1; + } +#endif /* USART1 */ +#ifdef USART2 + else if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "uart2") == 0) + { + console_uart.Instance = USART2; + } +#endif /* USART2 */ +#ifdef USART3 + else if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "uart3") == 0) + { + console_uart.Instance = USART3; + } +#endif /* USART3 */ +#ifdef USART4 + else if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "uart4") == 0) + { + console_uart.Instance = USART4; + } +#endif /* USART4 */ +#ifdef USART5 + else if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "uart5") == 0) + { + console_uart.Instance = USART5; + } +#endif /* USART5 */ +#ifdef USART6 + else if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "uart6") == 0) + { + console_uart.Instance = USART6; + } +#endif /* USART6 */ +#ifdef USART7 + else if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "uart7") == 0) + { + console_uart.Instance = USART7; + } +#endif /* USART7 */ + else + { + RT_ASSERT(0); + } + console_uart.Init.BaudRate = 115200; + console_uart.Init.WordLength = UART_WORDLENGTH_8B; + console_uart.Init.StopBits = UART_STOPBITS_1; + console_uart.Init.Parity = UART_PARITY_NONE; + console_uart.Init.Mode = UART_MODE_TX_RX; + console_uart.Init.HwFlowCtl = UART_HWCONTROL_NONE; + if (HAL_UART_Init(&console_uart) != HAL_OK) + { + Error_Handler(); + } +} + +void rt_hw_console_output(const char *str) +{ + rt_size_t i = 0, size = 0; + char a = '\r'; + + __HAL_UNLOCK(&console_uart); + + size = rt_strlen(str); + for (i = 0; i < size; i++) + { + if (*(str + i) == '\n') + { + HAL_UART_Transmit(&console_uart, (uint8_t *)&a, 1, 1); + } + HAL_UART_Transmit(&console_uart, (uint8_t *)(str + i), 1, 1); + } +} + +char rt_hw_console_getchar(void) +{ + int ch = -1; + + if (HAL_UART_Receive(&console_uart, (uint8_t *)&ch, 1, 0) != HAL_OK) + { + ch = -1; + rt_thread_mdelay(10); + } + return ch; +} diff --git a/bsp/stm32/libraries/HAL_Drivers/nano/drv_gpio.c b/bsp/stm32/libraries/HAL_Drivers/nano/drv_gpio.c new file mode 100644 index 0000000000..56e8a4bb46 --- /dev/null +++ b/bsp/stm32/libraries/HAL_Drivers/nano/drv_gpio.c @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2006-2023, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-12-02 Meco Man the first version + */ + +#include "drv_gpio.h" +#include +#include + +#define GET_GPIOx(pin) ((GPIO_TypeDef *)(rt_uint32_t)(pin & 0xFFFFFFFFULL)) +#define GET_GPIOPin(pin) ((uint16_t)(pin >> 32U)) + +void rt_pin_mode(rt_uint64_t pin, rt_uint8_t mode) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + GPIO_TypeDef *GPIOx = GET_GPIOx(pin); + uint16_t GPIO_Pin = GET_GPIOPin(pin); + + RT_ASSERT(mode == PIN_MODE_OUTPUT || mode == PIN_MODE_INPUT || + mode == PIN_MODE_INPUT_PULLUP || mode == PIN_MODE_INPUT_PULLDOWN || + mode == PIN_MODE_OUTPUT_OD); + + switch((rt_ubase_t)GPIOx) + { + case (rt_ubase_t)GPIOA: + __HAL_RCC_GPIOA_CLK_ENABLE(); + break; + case (rt_ubase_t)GPIOB: + __HAL_RCC_GPIOB_CLK_ENABLE(); + break; + case (rt_ubase_t)GPIOC: + __HAL_RCC_GPIOC_CLK_ENABLE(); + break; +#ifdef GPIOD + case (rt_ubase_t)GPIOD: + __HAL_RCC_GPIOD_CLK_ENABLE(); + break; +#endif /* GPIOD */ +#ifdef GPIOE + case (rt_ubase_t)GPIOE: + __HAL_RCC_GPIOE_CLK_ENABLE(); + break; +#endif /* GPIOE */ +#ifdef GPIOF + case (rt_ubase_t)GPIOF: + __HAL_RCC_GPIOF_CLK_ENABLE(); + break; +#endif /* GPIOF */ +#ifdef GPIOG + case (rt_ubase_t)GPIOG: + __HAL_RCC_GPIOG_CLK_ENABLE(); + break; +#endif /* GPIOG */ +#ifdef GPIOH + case (rt_ubase_t)GPIOH: + __HAL_RCC_GPIOH_CLK_ENABLE(); + break; +#endif /* GPIOH */ +#ifdef GPIOI + case (rt_ubase_t)GPIOI: + __HAL_RCC_GPIOI_CLK_ENABLE(); + break; +#endif /* GPIOI */ + } + + GPIO_InitStruct.Pin = GPIO_Pin; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + + if (mode == PIN_MODE_OUTPUT) + { + /* output setting */ + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + } + else if (mode == PIN_MODE_INPUT) + { + /* input setting: not pull. */ + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + } + else if (mode == PIN_MODE_INPUT_PULLUP) + { + /* input setting: pull up. */ + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_PULLUP; + } + else if (mode == PIN_MODE_INPUT_PULLDOWN) + { + /* input setting: pull down. */ + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; + } + else if (mode == PIN_MODE_OUTPUT_OD) + { + /* output setting: od. */ + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD; + GPIO_InitStruct.Pull = GPIO_NOPULL; + } + + HAL_GPIO_Init(GPIOx, &GPIO_InitStruct); +} + +void rt_pin_write(rt_uint64_t pin, rt_uint8_t value) +{ + GPIO_TypeDef *GPIOx = GET_GPIOx(pin); + uint16_t GPIO_Pin = GET_GPIOPin(pin); + + RT_ASSERT(value == PIN_LOW || value == PIN_HIGH); + + HAL_GPIO_WritePin(GPIOx, GPIO_Pin, (value == PIN_LOW) ? GPIO_PIN_RESET : GPIO_PIN_SET); +} + +rt_int8_t rt_pin_read(rt_uint64_t pin) +{ + GPIO_TypeDef *GPIOx = GET_GPIOx(pin); + uint16_t GPIO_Pin = GET_GPIOPin(pin); + + return HAL_GPIO_ReadPin(GPIOx, GPIO_Pin) == GPIO_PIN_RESET ? PIN_LOW : PIN_HIGH; +} diff --git a/bsp/stm32/libraries/HAL_Drivers/nano/drv_gpio.h b/bsp/stm32/libraries/HAL_Drivers/nano/drv_gpio.h new file mode 100644 index 0000000000..25cec94c43 --- /dev/null +++ b/bsp/stm32/libraries/HAL_Drivers/nano/drv_gpio.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2006-2023, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-12-02 Meco Man the first version + */ + +#ifndef __DRV_GPIO_H__ +#define __DRV_GPIO_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define PIN_LOW 0x00 +#define PIN_HIGH 0x01 + +#define PIN_MODE_OUTPUT 0x00 +#define PIN_MODE_INPUT 0x01 +#define PIN_MODE_INPUT_PULLUP 0x02 +#define PIN_MODE_INPUT_PULLDOWN 0x03 +#define PIN_MODE_OUTPUT_OD 0x04 + +#define GET_PIN(PORTx,PIN) (rt_uint64_t)((((rt_uint64_t)GPIO_PIN_##PIN) << 32) | (rt_uint64_t)(rt_ubase_t)GPIO##PORTx) + +void rt_pin_mode(rt_uint64_t pin, rt_uint8_t mode); +void rt_pin_write(rt_uint64_t pin, rt_uint8_t value); +rt_int8_t rt_pin_read(rt_uint64_t pin); + +#ifdef __cplusplus +} +#endif + +#endif /* __DRV_GPIO_H__ */ diff --git a/bsp/stm32/libraries/STM32F0xx_HAL/SConscript b/bsp/stm32/libraries/STM32F0xx_HAL/SConscript index 568f7c5ea0..1f118caa6a 100644 --- a/bsp/stm32/libraries/STM32F0xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32F0xx_HAL/SConscript @@ -26,7 +26,7 @@ STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c """) -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_uart.c'] src += ['STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_uart_ex.c'] src += ['STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32F1xx_HAL/SConscript b/bsp/stm32/libraries/STM32F1xx_HAL/SConscript index d6ed2ed377..12040da680 100644 --- a/bsp/stm32/libraries/STM32F1xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32F1xx_HAL/SConscript @@ -22,7 +22,7 @@ STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c if GetDepend(['RT_USING_PIN']): src += ['STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c'] -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c'] src += ['STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32F2xx_HAL/SConscript b/bsp/stm32/libraries/STM32F2xx_HAL/SConscript index 55d0af9293..fa65acbd9a 100644 --- a/bsp/stm32/libraries/STM32F2xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32F2xx_HAL/SConscript @@ -18,7 +18,7 @@ STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sram.c STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.c """) -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.c'] src += ['STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32F3xx_HAL/SConscript b/bsp/stm32/libraries/STM32F3xx_HAL/SConscript index ce5e693085..de512b2bd4 100644 --- a/bsp/stm32/libraries/STM32F3xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32F3xx_HAL/SConscript @@ -23,7 +23,7 @@ STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_sram.c STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_gpio.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_uart.c'] src += ['STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_uart_ex.c'] src += ['STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32F4xx_HAL/SConscript b/bsp/stm32/libraries/STM32F4xx_HAL/SConscript index 7af430fb4d..9cbd3bc47d 100644 --- a/bsp/stm32/libraries/STM32F4xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32F4xx_HAL/SConscript @@ -24,7 +24,7 @@ STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rng.c STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c'] src += ['STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32F7xx_HAL/SConscript b/bsp/stm32/libraries/STM32F7xx_HAL/SConscript index 7f2b603c67..6419fe4546 100644 --- a/bsp/stm32/libraries/STM32F7xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32F7xx_HAL/SConscript @@ -27,7 +27,7 @@ STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_sram.c STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_gpio.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c'] src += ['STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart_ex.c'] src += ['STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32G0xx_HAL/SConscript b/bsp/stm32/libraries/STM32G0xx_HAL/SConscript index 2e213f3402..26ee4c3966 100644 --- a/bsp/stm32/libraries/STM32G0xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32G0xx_HAL/SConscript @@ -21,7 +21,7 @@ STM32G0xx_HAL_Driver/Src/stm32g0xx_hal.c STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_gpio.c """) -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_uart.c'] src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_uart_ex.c'] src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_usart_ex.c'] diff --git a/bsp/stm32/libraries/STM32G4xx_HAL/SConscript b/bsp/stm32/libraries/STM32G4xx_HAL/SConscript index 05075a8d3c..5be73938ba 100644 --- a/bsp/stm32/libraries/STM32G4xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32G4xx_HAL/SConscript @@ -23,7 +23,7 @@ STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_rng.c STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_gpio.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_uart.c'] src += ['STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_uart_ex.c'] src += ['STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32H5xx_HAL/SConscript b/bsp/stm32/libraries/STM32H5xx_HAL/SConscript index 74d70f4d09..2bb498b76f 100644 --- a/bsp/stm32/libraries/STM32H5xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32H5xx_HAL/SConscript @@ -27,7 +27,7 @@ STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_gpio.c STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_icache.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_uart.c'] src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_uart_ex.c'] src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32H7xx_HAL/SConscript b/bsp/stm32/libraries/STM32H7xx_HAL/SConscript index ecbb0f6a68..69bbf2ab02 100644 --- a/bsp/stm32/libraries/STM32H7xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32H7xx_HAL/SConscript @@ -28,7 +28,7 @@ STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_sram.c STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c'] src += ['STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_usart.c'] src += ['STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c'] diff --git a/bsp/stm32/libraries/STM32L0xx_HAL/SConscript b/bsp/stm32/libraries/STM32L0xx_HAL/SConscript index 58dcfee448..1d18ead49e 100644 --- a/bsp/stm32/libraries/STM32L0xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32L0xx_HAL/SConscript @@ -24,7 +24,7 @@ STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_rng.c STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_gpio.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_uart.c'] src += ['STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_uart_ex.c'] src += ['STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32L1xx_HAL/SConscript b/bsp/stm32/libraries/STM32L1xx_HAL/SConscript index 217a9b2df2..7859bc2332 100644 --- a/bsp/stm32/libraries/STM32L1xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32L1xx_HAL/SConscript @@ -23,7 +23,7 @@ STM32L1xx_HAL_Driver/Src/stm32L1xx_hal_gpio.c -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32L1xx_HAL_Driver/Src/stm32L1xx_hal_uart.c'] src += ['STM32L1xx_HAL_Driver/Src/stm32L1xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32L5xx_HAL/SConscript b/bsp/stm32/libraries/STM32L5xx_HAL/SConscript index b7379e74c2..37e9d3d8bb 100644 --- a/bsp/stm32/libraries/STM32L5xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32L5xx_HAL/SConscript @@ -26,7 +26,7 @@ STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_rng.c STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_gpio.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_uart.c'] src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_uart_ex.c'] src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32MPxx_HAL/SConscript b/bsp/stm32/libraries/STM32MPxx_HAL/SConscript index f68136c1d6..c051a66969 100644 --- a/bsp/stm32/libraries/STM32MPxx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32MPxx_HAL/SConscript @@ -31,7 +31,7 @@ STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_tim.c STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_tim_ex.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_uart.c'] src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_uart_ex.c'] diff --git a/bsp/stm32/libraries/STM32U5xx_HAL/SConscript b/bsp/stm32/libraries/STM32U5xx_HAL/SConscript index 1376bc2003..3dfeb82ae1 100644 --- a/bsp/stm32/libraries/STM32U5xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32U5xx_HAL/SConscript @@ -27,7 +27,7 @@ STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_gpio.c STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_icache.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_uart.c'] src += ['STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_uart_ex.c'] src += ['STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32WBxx_HAL/SConscript b/bsp/stm32/libraries/STM32WBxx_HAL/SConscript index f516470857..c77baee906 100644 --- a/bsp/stm32/libraries/STM32WBxx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32WBxx_HAL/SConscript @@ -27,7 +27,7 @@ STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_uart.c'] src += ['STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_uart_ex.c'] src += ['STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_usart.c'] diff --git a/bsp/stm32/libraries/STM32WLxx_HAL/SConscript b/bsp/stm32/libraries/STM32WLxx_HAL/SConscript index 6403fa3f03..028385b51a 100644 --- a/bsp/stm32/libraries/STM32WLxx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32WLxx_HAL/SConscript @@ -26,7 +26,7 @@ STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_rng.c STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_gpio.c ''') -if GetDepend(['RT_USING_SERIAL']): +if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']): src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_uart.c'] src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_uart_ex.c'] src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_usart.c'] diff --git a/bsp/stm32/libraries/templates/stm32f0xx/Kconfig b/bsp/stm32/libraries/templates/stm32f0xx/Kconfig index 7a400db91f..362bdfbed8 100644 --- a/bsp/stm32/libraries/templates/stm32f0xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f0xx/Kconfig @@ -18,5 +18,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" -source "board/Kconfig" +if !RT_USING_NANO +source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32f0xx/board/Kconfig b/bsp/stm32/libraries/templates/stm32f0xx/board/Kconfig index 522a2239e2..6a012363e4 100644 --- a/bsp/stm32/libraries/templates/stm32f0xx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f0xx/board/Kconfig @@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers" default n endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32f10x/Kconfig b/bsp/stm32/libraries/templates/stm32f10x/Kconfig index 7a400db91f..1b639d65a7 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f10x/Kconfig @@ -18,5 +18,8 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" -source "board/Kconfig" + +if !RT_USING_NANO +source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32f10x/board/Kconfig b/bsp/stm32/libraries/templates/stm32f10x/board/Kconfig index 3e1b8229f4..4adac92499 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f10x/board/Kconfig @@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers" default n endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32f2xx/Kconfig b/bsp/stm32/libraries/templates/stm32f2xx/Kconfig index 7a400db91f..362bdfbed8 100644 --- a/bsp/stm32/libraries/templates/stm32f2xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f2xx/Kconfig @@ -18,5 +18,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" -source "board/Kconfig" +if !RT_USING_NANO +source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32f2xx/board/Kconfig b/bsp/stm32/libraries/templates/stm32f2xx/board/Kconfig index 16686c801c..62a95b1064 100644 --- a/bsp/stm32/libraries/templates/stm32f2xx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f2xx/board/Kconfig @@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers" default n endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32f3xx/Kconfig b/bsp/stm32/libraries/templates/stm32f3xx/Kconfig index 79b160b856..362bdfbed8 100644 --- a/bsp/stm32/libraries/templates/stm32f3xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f3xx/Kconfig @@ -18,4 +18,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" + +if !RT_USING_NANO source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32f4xx/Kconfig b/bsp/stm32/libraries/templates/stm32f4xx/Kconfig index 79b160b856..362bdfbed8 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f4xx/Kconfig @@ -18,4 +18,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" + +if !RT_USING_NANO source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32f4xx/board/Kconfig b/bsp/stm32/libraries/templates/stm32f4xx/board/Kconfig index 81bc6c1aa9..6b1faba6b0 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f4xx/board/Kconfig @@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers" default n endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32f7xx/Kconfig b/bsp/stm32/libraries/templates/stm32f7xx/Kconfig index 79b160b856..362bdfbed8 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f7xx/Kconfig @@ -18,4 +18,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" + +if !RT_USING_NANO source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32f7xx/board/Kconfig b/bsp/stm32/libraries/templates/stm32f7xx/board/Kconfig index 6495614694..4c6c6f7e55 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32f7xx/board/Kconfig @@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers" default n endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32h7xx/Kconfig b/bsp/stm32/libraries/templates/stm32h7xx/Kconfig index 79b160b856..362bdfbed8 100644 --- a/bsp/stm32/libraries/templates/stm32h7xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32h7xx/Kconfig @@ -18,4 +18,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" + +if !RT_USING_NANO source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32h7xx/board/Kconfig b/bsp/stm32/libraries/templates/stm32h7xx/board/Kconfig index 2547353580..059987a8e1 100644 --- a/bsp/stm32/libraries/templates/stm32h7xx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32h7xx/board/Kconfig @@ -29,7 +29,7 @@ menu "On-chip Peripheral Drivers" endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32l1xx/Kconfig b/bsp/stm32/libraries/templates/stm32l1xx/Kconfig index 7a400db91f..1b639d65a7 100644 --- a/bsp/stm32/libraries/templates/stm32l1xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32l1xx/Kconfig @@ -18,5 +18,8 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" -source "board/Kconfig" + +if !RT_USING_NANO +source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32l1xx/board/Kconfig b/bsp/stm32/libraries/templates/stm32l1xx/board/Kconfig index 93c14df120..78831f2106 100644 --- a/bsp/stm32/libraries/templates/stm32l1xx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32l1xx/board/Kconfig @@ -206,7 +206,7 @@ menu "On-chip Peripheral Drivers" select RT_USING_WDT default n - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32l4xx/Kconfig b/bsp/stm32/libraries/templates/stm32l4xx/Kconfig index 79b160b856..362bdfbed8 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32l4xx/Kconfig @@ -18,4 +18,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" + +if !RT_USING_NANO source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32l4xx/board/Kconfig b/bsp/stm32/libraries/templates/stm32l4xx/board/Kconfig index e8b7bbcb31..a02e7d7458 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32l4xx/board/Kconfig @@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers" default n endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32l5xx/Kconfig b/bsp/stm32/libraries/templates/stm32l5xx/Kconfig index 79b160b856..362bdfbed8 100644 --- a/bsp/stm32/libraries/templates/stm32l5xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32l5xx/Kconfig @@ -18,4 +18,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" + +if !RT_USING_NANO source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32l5xx/board/Kconfig b/bsp/stm32/libraries/templates/stm32l5xx/board/Kconfig index cb91e5e446..85a3fe5dd3 100644 --- a/bsp/stm32/libraries/templates/stm32l5xx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32l5xx/board/Kconfig @@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers" default n endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32mp1xx/Kconfig b/bsp/stm32/libraries/templates/stm32mp1xx/Kconfig index 7a400db91f..1b639d65a7 100644 --- a/bsp/stm32/libraries/templates/stm32mp1xx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32mp1xx/Kconfig @@ -18,5 +18,8 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" -source "board/Kconfig" + +if !RT_USING_NANO +source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32mp1xx/board/Kconfig b/bsp/stm32/libraries/templates/stm32mp1xx/board/Kconfig index 1400cb32e3..28a1826d43 100644 --- a/bsp/stm32/libraries/templates/stm32mp1xx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32mp1xx/board/Kconfig @@ -39,7 +39,7 @@ menu "On-chip Peripheral Drivers" endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32wbxx/Kconfig b/bsp/stm32/libraries/templates/stm32wbxx/Kconfig index 79b160b856..362bdfbed8 100644 --- a/bsp/stm32/libraries/templates/stm32wbxx/Kconfig +++ b/bsp/stm32/libraries/templates/stm32wbxx/Kconfig @@ -18,4 +18,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" + +if !RT_USING_NANO source "board/Kconfig" +endif diff --git a/bsp/stm32/libraries/templates/stm32wbxx/board/Kconfig b/bsp/stm32/libraries/templates/stm32wbxx/board/Kconfig index 806100aca1..0dc981d28c 100644 --- a/bsp/stm32/libraries/templates/stm32wbxx/board/Kconfig +++ b/bsp/stm32/libraries/templates/stm32wbxx/board/Kconfig @@ -157,7 +157,7 @@ menu "On-chip Peripheral Drivers" endchoice endif - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/libraries/templates/stm32xx_board_Kconfig b/bsp/stm32/libraries/templates/stm32xx_board_Kconfig index ba8f7bd25b..0cc7a077ba 100644 --- a/bsp/stm32/libraries/templates/stm32xx_board_Kconfig +++ b/bsp/stm32/libraries/templates/stm32xx_board_Kconfig @@ -175,7 +175,7 @@ menu "On-chip Peripheral Drivers" select RT_USING_USB_DEVICE default n - source "../libraries/HAL_Drivers/Kconfig" + source "../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/tools/mkdist.py b/tools/mkdist.py index d44f2336b1..246c8e7a7d 100644 --- a/tools/mkdist.py +++ b/tools/mkdist.py @@ -162,9 +162,9 @@ def bsp_update_kconfig_library(dist_dir): data = f.readlines() with open(os.path.join(dist_dir, 'board/Kconfig'), 'w') as f: for line in data: - if line.find('../libraries/HAL_Drivers/Kconfig') != -1: - position = line.find('../libraries/HAL_Drivers/Kconfig') - line = line[0:position] + 'libraries/HAL_Drivers/Kconfig"\n' + if line.find('../libraries/HAL_Drivers/drivers/Kconfig') != -1: + position = line.find('../libraries/HAL_Drivers/drivers/Kconfig') + line = line[0:position] + 'libraries/HAL_Drivers/drivers/Kconfig"\n' f.write(line) def zip_dist(dist_dir, dist_name):