From 1e02f6e066744203bbd549f2d0e82bf98331804e Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 13:11:23 +0700 Subject: [PATCH] f3 use offical st driver repo --- .gitmodules | 6 ++++++ hw/bsp/stm32f303disco/board.mk | 17 +++++++++-------- hw/mcu/st/cmsis_device_f3 | 1 + hw/mcu/st/stm32f3xx_hal_driver | 1 + 4 files changed, 17 insertions(+), 8 deletions(-) create mode 160000 hw/mcu/st/cmsis_device_f3 create mode 160000 hw/mcu/st/stm32f3xx_hal_driver diff --git a/.gitmodules b/.gitmodules index ee7372ae..3a3f50fc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -55,3 +55,9 @@ [submodule "hw/mcu/st/stm32f2xx_hal_driver"] path = hw/mcu/st/stm32f2xx_hal_driver url = https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_f3"] + path = hw/mcu/st/cmsis_device_f3 + url = https://github.com/STMicroelectronics/cmsis_device_f3.git +[submodule "hw/mcu/st/stm32f3xx_hal_driver"] + path = hw/mcu/st/stm32f3xx_hal_driver + url = https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git diff --git a/hw/bsp/stm32f303disco/board.mk b/hw/bsp/stm32f303disco/board.mk index cb94dac3..3459c28a 100644 --- a/hw/bsp/stm32f303disco/board.mk +++ b/hw/bsp/stm32f303disco/board.mk @@ -12,19 +12,20 @@ CFLAGS += \ # mcu driver cause following warnings CFLAGS += -Wno-error=unused-parameter -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F3xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F3xx +ST_FAMILY = f3 +ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) +ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/STM32F303VCTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f3xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f3xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f3xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f3xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f3xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f3xx_hal_gpio.c + $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f303xc.s diff --git a/hw/mcu/st/cmsis_device_f3 b/hw/mcu/st/cmsis_device_f3 new file mode 160000 index 00000000..5e4ee5ed --- /dev/null +++ b/hw/mcu/st/cmsis_device_f3 @@ -0,0 +1 @@ +Subproject commit 5e4ee5ed7a7b6c85176bb70a9fd3c72d6eb99f1b diff --git a/hw/mcu/st/stm32f3xx_hal_driver b/hw/mcu/st/stm32f3xx_hal_driver new file mode 160000 index 00000000..1761b620 --- /dev/null +++ b/hw/mcu/st/stm32f3xx_hal_driver @@ -0,0 +1 @@ +Subproject commit 1761b6207318ede021706e75aae78f452d72b6fa