From bbcf2d7e01cbd13b9065f622a898a0e5b4c01b08 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 13:01:01 +0700 Subject: [PATCH] f2 use offical st driver repo --- .gitmodules | 6 ++++++ hw/bsp/stm32f207nucleo/board.mk | 18 ++++++++++-------- hw/mcu/st/cmsis_device_f2 | 1 + hw/mcu/st/stm32f2xx_hal_driver | 1 + 4 files changed, 18 insertions(+), 8 deletions(-) create mode 160000 hw/mcu/st/cmsis_device_f2 create mode 160000 hw/mcu/st/stm32f2xx_hal_driver diff --git a/.gitmodules b/.gitmodules index 89dbed9f..ee7372ae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,3 +49,9 @@ [submodule "hw/mcu/st/stm32f1xx_hal_driver"] path = hw/mcu/st/stm32f1xx_hal_driver url = https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_f2"] + path = hw/mcu/st/cmsis_device_f2 + url = https://github.com/STMicroelectronics/cmsis_device_f2.git +[submodule "hw/mcu/st/stm32f2xx_hal_driver"] + path = hw/mcu/st/stm32f2xx_hal_driver + url = https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git diff --git a/hw/bsp/stm32f207nucleo/board.mk b/hw/bsp/stm32f207nucleo/board.mk index 27d8638d..cad816d9 100644 --- a/hw/bsp/stm32f207nucleo/board.mk +++ b/hw/bsp/stm32f207nucleo/board.mk @@ -11,19 +11,21 @@ CFLAGS += \ # mcu driver cause following warnings CFLAGS += -Wno-error=sign-compare -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F2xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F2xx +ST_FAMILY = f2 +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)/STM32F207ZGTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f2xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f2xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f2xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f2xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f2xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f2xx_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_stm32f207xx.s diff --git a/hw/mcu/st/cmsis_device_f2 b/hw/mcu/st/cmsis_device_f2 new file mode 160000 index 00000000..182fcb36 --- /dev/null +++ b/hw/mcu/st/cmsis_device_f2 @@ -0,0 +1 @@ +Subproject commit 182fcb3681ce116816feb41b7764f1b019ce796f diff --git a/hw/mcu/st/stm32f2xx_hal_driver b/hw/mcu/st/stm32f2xx_hal_driver new file mode 160000 index 00000000..c75ace9b --- /dev/null +++ b/hw/mcu/st/stm32f2xx_hal_driver @@ -0,0 +1 @@ +Subproject commit c75ace9b908a9aca631193ebf2466963b8ea33d0