From e4eb2de4018572ecdab8e0e738447e5929021519 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 12:15:04 +0700 Subject: [PATCH 01/14] f4 use offical st driver repo --- .gitmodules | 6 ++++++ hw/bsp/feather_stm32f405/board.mk | 17 +++++++++-------- hw/bsp/pyboardv11/board.mk | 15 ++++++++------- hw/bsp/stm32f401blackpill/board.mk | 15 ++++++++------- hw/bsp/stm32f407disco/board.mk | 17 +++++++++-------- hw/bsp/stm32f411blackpill/board.mk | 15 ++++++++------- hw/bsp/stm32f411disco/board.mk | 17 +++++++++-------- hw/bsp/stm32f412disco/board.mk | 19 ++++++++++--------- hw/mcu/st/cmsis_device_f4 | 1 + hw/mcu/st/stm32f4xx_hal_driver | 1 + 10 files changed, 69 insertions(+), 54 deletions(-) create mode 160000 hw/mcu/st/cmsis_device_f4 create mode 160000 hw/mcu/st/stm32f4xx_hal_driver diff --git a/.gitmodules b/.gitmodules index c8f8eea97..f15d00f8b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -31,3 +31,9 @@ [submodule "lib/CMSIS_4"] path = lib/CMSIS_4 url = https://github.com/ARM-software/CMSIS.git +[submodule "hw/mcu/st/cmsis_device_f4"] + path = hw/mcu/st/cmsis_device_f4 + url = https://github.com/STMicroelectronics/cmsis_device_f4.git +[submodule "hw/mcu/st/stm32f4xx_hal_driver"] + path = hw/mcu/st/stm32f4xx_hal_driver + url = https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git diff --git a/hw/bsp/feather_stm32f405/board.mk b/hw/bsp/feather_stm32f405/board.mk index 1988fa46e..fdba8cd0d 100644 --- a/hw/bsp/feather_stm32f405/board.mk +++ b/hw/bsp/feather_stm32f405/board.mk @@ -12,19 +12,20 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx +ST_FAMILY = f4 +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)/STM32F405RGTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_uart.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_gpio.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s diff --git a/hw/bsp/pyboardv11/board.mk b/hw/bsp/pyboardv11/board.mk index 3be06e844..aa185ae3c 100644 --- a/hw/bsp/pyboardv11/board.mk +++ b/hw/bsp/pyboardv11/board.mk @@ -9,18 +9,19 @@ CFLAGS += \ -DSTM32F405xx \ -DCFG_TUSB_MCU=OPT_MCU_STM32F4 -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx +ST_FAMILY = f4 +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)/STM32F405RGTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_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_gpio.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s diff --git a/hw/bsp/stm32f401blackpill/board.mk b/hw/bsp/stm32f401blackpill/board.mk index 993e29c5f..3d52a79ed 100644 --- a/hw/bsp/stm32f401blackpill/board.mk +++ b/hw/bsp/stm32f401blackpill/board.mk @@ -9,18 +9,19 @@ CFLAGS += \ -DSTM32F401xC \ -DCFG_TUSB_MCU=OPT_MCU_STM32F4 -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx +ST_FAMILY = f4 +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)/STM32F401VCTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_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_gpio.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f401xc.s diff --git a/hw/bsp/stm32f407disco/board.mk b/hw/bsp/stm32f407disco/board.mk index 87b7bea10..542588fc2 100644 --- a/hw/bsp/stm32f407disco/board.mk +++ b/hw/bsp/stm32f407disco/board.mk @@ -12,19 +12,20 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx +ST_FAMILY = f4 +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)/STM32F407VGTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_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_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f407xx.s diff --git a/hw/bsp/stm32f411blackpill/board.mk b/hw/bsp/stm32f411blackpill/board.mk index 3441dbb52..5b7a70017 100644 --- a/hw/bsp/stm32f411blackpill/board.mk +++ b/hw/bsp/stm32f411blackpill/board.mk @@ -9,18 +9,19 @@ CFLAGS += \ -DSTM32F411xE \ -DCFG_TUSB_MCU=OPT_MCU_STM32F4 -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx +ST_FAMILY = f4 +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)/STM32F411CEUx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_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_gpio.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s diff --git a/hw/bsp/stm32f411disco/board.mk b/hw/bsp/stm32f411disco/board.mk index f15d802ab..cea8d2cdb 100644 --- a/hw/bsp/stm32f411disco/board.mk +++ b/hw/bsp/stm32f411disco/board.mk @@ -12,19 +12,20 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx +ST_FAMILY = f4 +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)/STM32F411VETx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_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_gpio.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s diff --git a/hw/bsp/stm32f412disco/board.mk b/hw/bsp/stm32f412disco/board.mk index 0cc32da20..d991c4b75 100644 --- a/hw/bsp/stm32f412disco/board.mk +++ b/hw/bsp/stm32f412disco/board.mk @@ -12,20 +12,21 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx +ST_FAMILY = f4 +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)/STM32F412ZGTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32f4xx_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_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f412zx.s diff --git a/hw/mcu/st/cmsis_device_f4 b/hw/mcu/st/cmsis_device_f4 new file mode 160000 index 000000000..2615e866f --- /dev/null +++ b/hw/mcu/st/cmsis_device_f4 @@ -0,0 +1 @@ +Subproject commit 2615e866fa48fe1ff1af9e31c348813f2b19e7ec diff --git a/hw/mcu/st/stm32f4xx_hal_driver b/hw/mcu/st/stm32f4xx_hal_driver new file mode 160000 index 000000000..04e99fbda --- /dev/null +++ b/hw/mcu/st/stm32f4xx_hal_driver @@ -0,0 +1 @@ +Subproject commit 04e99fbdabd00ab8f370f377c66b0a4570365b58 From 41a36b125661a57551124f3908fea8e682dfbc4c Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 12:48:34 +0700 Subject: [PATCH 02/14] f0 use offical st driver repo --- .gitmodules | 6 ++++++ hw/bsp/stm32f070rbnucleo/board.mk | 20 +++++++++++--------- hw/bsp/stm32f072disco/board.mk | 19 ++++++++++--------- hw/mcu/st/cmsis_device_f0 | 1 + hw/mcu/st/stm32f0xx_hal_driver | 1 + 5 files changed, 29 insertions(+), 18 deletions(-) create mode 160000 hw/mcu/st/cmsis_device_f0 create mode 160000 hw/mcu/st/stm32f0xx_hal_driver diff --git a/.gitmodules b/.gitmodules index f15d00f8b..b2b706160 100644 --- a/.gitmodules +++ b/.gitmodules @@ -37,3 +37,9 @@ [submodule "hw/mcu/st/stm32f4xx_hal_driver"] path = hw/mcu/st/stm32f4xx_hal_driver url = https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_f0"] + path = hw/mcu/st/cmsis_device_f0 + url = https://github.com/STMicroelectronics/cmsis_device_f0.git +[submodule "hw/mcu/st/stm32f0xx_hal_driver"] + path = hw/mcu/st/stm32f0xx_hal_driver + url = https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git diff --git a/hw/bsp/stm32f070rbnucleo/board.mk b/hw/bsp/stm32f070rbnucleo/board.mk index eec479bb4..70aeccc0b 100644 --- a/hw/bsp/stm32f070rbnucleo/board.mk +++ b/hw/bsp/stm32f070rbnucleo/board.mk @@ -12,20 +12,22 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F0xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F0xx +ST_FAMILY = f0 +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)/stm32F070rbtx_flash.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f0xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_uart.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c + SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f070xb.s diff --git a/hw/bsp/stm32f072disco/board.mk b/hw/bsp/stm32f072disco/board.mk index 4155acf84..4b73b570b 100644 --- a/hw/bsp/stm32f072disco/board.mk +++ b/hw/bsp/stm32f072disco/board.mk @@ -12,20 +12,21 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F0xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F0xx +ST_FAMILY = f0 +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)/STM32F072RBTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f0xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32f0xx_hal_uart.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s diff --git a/hw/mcu/st/cmsis_device_f0 b/hw/mcu/st/cmsis_device_f0 new file mode 160000 index 000000000..2fc25ee22 --- /dev/null +++ b/hw/mcu/st/cmsis_device_f0 @@ -0,0 +1 @@ +Subproject commit 2fc25ee22264bc27034358be0bd400b893ef837e diff --git a/hw/mcu/st/stm32f0xx_hal_driver b/hw/mcu/st/stm32f0xx_hal_driver new file mode 160000 index 000000000..0e95cd886 --- /dev/null +++ b/hw/mcu/st/stm32f0xx_hal_driver @@ -0,0 +1 @@ +Subproject commit 0e95cd88657030f640a11e690a8a5186c7712ea5 From 092f7baec02f8008d4d1f579c5094e7096db2183 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 12:49:43 +0700 Subject: [PATCH 03/14] random clean up --- hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c | 1 + hw/bsp/teensy_40/teensy40.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c b/hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c index 1042bcfe7..6fb00b9b7 100644 --- a/hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c +++ b/hw/bsp/mimxrt1060_evk/mimxrt1060_evk.c @@ -49,6 +49,7 @@ #define UART_RX_PINMUX IOMUXC_GPIO_AD_B0_13_LPUART1_RX #define UART_TX_PINMUX IOMUXC_GPIO_AD_B0_12_LPUART1_TX +// needed by fsl_flexspi_nor_boot const uint8_t dcd_data[] = { 0x00 }; void board_init(void) diff --git a/hw/bsp/teensy_40/teensy40.c b/hw/bsp/teensy_40/teensy40.c index 30fdedd27..85501df11 100644 --- a/hw/bsp/teensy_40/teensy40.c +++ b/hw/bsp/teensy_40/teensy40.c @@ -49,6 +49,7 @@ #define UART_RX_PINMUX IOMUXC_GPIO_AD_B0_03_LPUART6_RX // D0 #define UART_TX_PINMUX IOMUXC_GPIO_AD_B0_02_LPUART6_TX // D1 +// needed by fsl_flexspi_nor_boot const uint8_t dcd_data[] = { 0x00 }; void board_init(void) From 8850ea90b4b94611901602e99a7bd0952327db8d Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 12:55:54 +0700 Subject: [PATCH 04/14] f1 use offical st driver repo --- .gitmodules | 6 ++++++ hw/bsp/stm32f103bluepill/board.mk | 17 +++++++++-------- hw/mcu/st/cmsis_device_f1 | 1 + hw/mcu/st/stm32f1xx_hal_driver | 1 + 4 files changed, 17 insertions(+), 8 deletions(-) create mode 160000 hw/mcu/st/cmsis_device_f1 create mode 160000 hw/mcu/st/stm32f1xx_hal_driver diff --git a/.gitmodules b/.gitmodules index b2b706160..89dbed9fe 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,3 +43,9 @@ [submodule "hw/mcu/st/stm32f0xx_hal_driver"] path = hw/mcu/st/stm32f0xx_hal_driver url = https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_f1"] + path = hw/mcu/st/cmsis_device_f1 + url = https://github.com/STMicroelectronics/cmsis_device_f1.git +[submodule "hw/mcu/st/stm32f1xx_hal_driver"] + path = hw/mcu/st/stm32f1xx_hal_driver + url = https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git diff --git a/hw/bsp/stm32f103bluepill/board.mk b/hw/bsp/stm32f103bluepill/board.mk index 124b16021..8ab973776 100644 --- a/hw/bsp/stm32f103bluepill/board.mk +++ b/hw/bsp/stm32f103bluepill/board.mk @@ -11,19 +11,20 @@ CFLAGS += \ # mcu driver cause following warnings #CFLAGS += -Wno-error=unused-parameter -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F1xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F1xx +ST_FAMILY = f1 +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)/STM32F103XB_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f1xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f1xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f1xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f1xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f1xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f1xx_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_stm32f103xb.s diff --git a/hw/mcu/st/cmsis_device_f1 b/hw/mcu/st/cmsis_device_f1 new file mode 160000 index 000000000..6601104a6 --- /dev/null +++ b/hw/mcu/st/cmsis_device_f1 @@ -0,0 +1 @@ +Subproject commit 6601104a6397299b7304fd5bcd9a491f56cb23a6 diff --git a/hw/mcu/st/stm32f1xx_hal_driver b/hw/mcu/st/stm32f1xx_hal_driver new file mode 160000 index 000000000..1dd9d3662 --- /dev/null +++ b/hw/mcu/st/stm32f1xx_hal_driver @@ -0,0 +1 @@ +Subproject commit 1dd9d3662fb7eb2a7f7d3bc0a4c1dc7537915a29 From bbcf2d7e01cbd13b9065f622a898a0e5b4c01b08 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 13:01:01 +0700 Subject: [PATCH 05/14] 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 89dbed9fe..ee7372aef 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 27d8638d3..cad816d9f 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 000000000..182fcb368 --- /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 000000000..c75ace9b9 --- /dev/null +++ b/hw/mcu/st/stm32f2xx_hal_driver @@ -0,0 +1 @@ +Subproject commit c75ace9b908a9aca631193ebf2466963b8ea33d0 From 1e02f6e066744203bbd549f2d0e82bf98331804e Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 13:11:23 +0700 Subject: [PATCH 06/14] 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 ee7372aef..3a3f50fcc 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 cb94dac3b..3459c28af 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 000000000..5e4ee5ed7 --- /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 000000000..1761b6207 --- /dev/null +++ b/hw/mcu/st/stm32f3xx_hal_driver @@ -0,0 +1 @@ +Subproject commit 1761b6207318ede021706e75aae78f452d72b6fa From b9ca7e91dff4861a4ca2c65f462b6b1cbf9e06cc Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 13:18:56 +0700 Subject: [PATCH 07/14] f7 use offical st driver repo --- .gitmodules | 6 ++++++ hw/bsp/stlinkv3mini/board.mk | 21 +++++++++++---------- hw/bsp/stm32f723disco/board.mk | 21 +++++++++++---------- hw/bsp/stm32f746disco/board.mk | 21 +++++++++++---------- hw/bsp/stm32f746nucleo/board.mk | 21 +++++++++++---------- hw/bsp/stm32f767nucleo/board.mk | 21 +++++++++++---------- hw/bsp/stm32f769disco/board.mk | 21 +++++++++++---------- hw/mcu/st/cmsis_device_f7 | 1 + hw/mcu/st/stm32f7xx_hal_driver | 1 + 9 files changed, 74 insertions(+), 60 deletions(-) create mode 160000 hw/mcu/st/cmsis_device_f7 create mode 160000 hw/mcu/st/stm32f7xx_hal_driver diff --git a/.gitmodules b/.gitmodules index 3a3f50fcc..abf1439a9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -61,3 +61,9 @@ [submodule "hw/mcu/st/stm32f3xx_hal_driver"] path = hw/mcu/st/stm32f3xx_hal_driver url = https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_f7"] + path = hw/mcu/st/cmsis_device_f7 + url = https://github.com/STMicroelectronics/cmsis_device_f7.git +[submodule "hw/mcu/st/stm32f7xx_hal_driver"] + path = hw/mcu/st/stm32f7xx_hal_driver + url = https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git diff --git a/hw/bsp/stlinkv3mini/board.mk b/hw/bsp/stlinkv3mini/board.mk index 4ca6cfd68..5157fbf14 100644 --- a/hw/bsp/stlinkv3mini/board.mk +++ b/hw/bsp/stlinkv3mini/board.mk @@ -26,21 +26,22 @@ endif # mcu driver cause following warnings CFLAGS += -Wno-error=shadow -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F7xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F7xx +ST_FAMILY = f7 +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)/STM32F723xE_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f7xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_pwr_ex.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f723xx.s diff --git a/hw/bsp/stm32f723disco/board.mk b/hw/bsp/stm32f723disco/board.mk index 9ec23bfde..50c25810f 100644 --- a/hw/bsp/stm32f723disco/board.mk +++ b/hw/bsp/stm32f723disco/board.mk @@ -29,21 +29,22 @@ endif # mcu driver cause following warnings CFLAGS += -Wno-error=shadow -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F7xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F7xx +ST_FAMILY = f7 +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)/STM32F723xE_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f7xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_pwr_ex.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f723xx.s diff --git a/hw/bsp/stm32f746disco/board.mk b/hw/bsp/stm32f746disco/board.mk index 48cb3f141..95feac1f6 100644 --- a/hw/bsp/stm32f746disco/board.mk +++ b/hw/bsp/stm32f746disco/board.mk @@ -29,21 +29,22 @@ endif # mcu driver cause following warnings CFLAGS += -Wno-error=shadow -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F7xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F7xx +ST_FAMILY = f7 +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)/STM32F746ZGTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f7xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_pwr_ex.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f746xx.s diff --git a/hw/bsp/stm32f746nucleo/board.mk b/hw/bsp/stm32f746nucleo/board.mk index 95445486a..140e2d639 100644 --- a/hw/bsp/stm32f746nucleo/board.mk +++ b/hw/bsp/stm32f746nucleo/board.mk @@ -12,21 +12,22 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=cast-align -Wno-error=shadow -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F7xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F7xx +ST_FAMILY = f7 +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)/STM32F746ZGTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f7xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_pwr_ex.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f746xx.s diff --git a/hw/bsp/stm32f767nucleo/board.mk b/hw/bsp/stm32f767nucleo/board.mk index fc638ddcb..c6be2bcbf 100644 --- a/hw/bsp/stm32f767nucleo/board.mk +++ b/hw/bsp/stm32f767nucleo/board.mk @@ -12,21 +12,22 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=cast-align -Wno-error=shadow -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F7xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F7xx +ST_FAMILY = f7 +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)/STM32F767ZITx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f7xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_pwr_ex.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f767xx.s diff --git a/hw/bsp/stm32f769disco/board.mk b/hw/bsp/stm32f769disco/board.mk index 962dddc68..ced2240c0 100644 --- a/hw/bsp/stm32f769disco/board.mk +++ b/hw/bsp/stm32f769disco/board.mk @@ -26,21 +26,22 @@ endif # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=cast-align -Wno-error=shadow -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F7xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F7xx +ST_FAMILY = f7 +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)/STM32F769ZITx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32f7xx.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32f7xx_hal_pwr_ex.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f769xx.s diff --git a/hw/mcu/st/cmsis_device_f7 b/hw/mcu/st/cmsis_device_f7 new file mode 160000 index 000000000..fc676ef1a --- /dev/null +++ b/hw/mcu/st/cmsis_device_f7 @@ -0,0 +1 @@ +Subproject commit fc676ef1ad177eb874eaa06444d3d75395fc51f4 diff --git a/hw/mcu/st/stm32f7xx_hal_driver b/hw/mcu/st/stm32f7xx_hal_driver new file mode 160000 index 000000000..f7ffdf6bf --- /dev/null +++ b/hw/mcu/st/stm32f7xx_hal_driver @@ -0,0 +1 @@ +Subproject commit f7ffdf6bf72110e58b42c632b0a051df5997e4ee From 3659d8e89a8918f27d339cbc3688301b5ed2b2d8 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 13:28:14 +0700 Subject: [PATCH 08/14] h7 use offical st driver repo --- .gitmodules | 6 ++++++ hw/bsp/stm32h743eval/board.mk | 21 +++++++++++---------- hw/bsp/stm32h743nucleo/board.mk | 21 +++++++++++---------- hw/bsp/stm32h745disco/board.mk | 21 +++++++++++---------- hw/mcu/st/cmsis_device_h7 | 1 + hw/mcu/st/stm32h7xx_hal_driver | 1 + 6 files changed, 41 insertions(+), 30 deletions(-) create mode 160000 hw/mcu/st/cmsis_device_h7 create mode 160000 hw/mcu/st/stm32h7xx_hal_driver diff --git a/.gitmodules b/.gitmodules index abf1439a9..6a75df141 100644 --- a/.gitmodules +++ b/.gitmodules @@ -67,3 +67,9 @@ [submodule "hw/mcu/st/stm32f7xx_hal_driver"] path = hw/mcu/st/stm32f7xx_hal_driver url = https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_h7"] + path = hw/mcu/st/cmsis_device_h7 + url = https://github.com/STMicroelectronics/cmsis_device_h7.git +[submodule "hw/mcu/st/stm32h7xx_hal_driver"] + path = hw/mcu/st/stm32h7xx_hal_driver + url = https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git diff --git a/hw/bsp/stm32h743eval/board.mk b/hw/bsp/stm32h743eval/board.mk index 543b40a30..87de060c5 100644 --- a/hw/bsp/stm32h743eval/board.mk +++ b/hw/bsp/stm32h743eval/board.mk @@ -23,21 +23,22 @@ endif # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32H7xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32H7xx +ST_FAMILY = h7 +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)/STM32H743XIHx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32h7xx.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_pwr_ex.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s diff --git a/hw/bsp/stm32h743nucleo/board.mk b/hw/bsp/stm32h743nucleo/board.mk index 43a4999a4..eade0f09a 100644 --- a/hw/bsp/stm32h743nucleo/board.mk +++ b/hw/bsp/stm32h743nucleo/board.mk @@ -12,21 +12,22 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32H7xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32H7xx +ST_FAMILY = h7 +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)/STM32H743ZITx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32h7xx.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_pwr_ex.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s diff --git a/hw/bsp/stm32h745disco/board.mk b/hw/bsp/stm32h745disco/board.mk index eb87e7461..8489748c7 100644 --- a/hw/bsp/stm32h745disco/board.mk +++ b/hw/bsp/stm32h745disco/board.mk @@ -18,21 +18,22 @@ CFLAGS += \ # suppress warning caused by vendor mcu driver CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32H7xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32H7xx +ST_FAMILY = h7 +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)/STM32H74xXIHx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32h7xx.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32h7xx_hal_pwr_ex.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 \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h745xx.s diff --git a/hw/mcu/st/cmsis_device_h7 b/hw/mcu/st/cmsis_device_h7 new file mode 160000 index 000000000..60dc2c913 --- /dev/null +++ b/hw/mcu/st/cmsis_device_h7 @@ -0,0 +1 @@ +Subproject commit 60dc2c913203dc8629dc233d4384dcc41c91e77f diff --git a/hw/mcu/st/stm32h7xx_hal_driver b/hw/mcu/st/stm32h7xx_hal_driver new file mode 160000 index 000000000..d8461b980 --- /dev/null +++ b/hw/mcu/st/stm32h7xx_hal_driver @@ -0,0 +1 @@ +Subproject commit d8461b980b59b1625207d8c4f2ce0a9c2a7a3b04 From ac231d7b2d45618c813cfd76988170c0dfa164d8 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 13:40:20 +0700 Subject: [PATCH 09/14] l0 use offical st driver repo --- .gitmodules | 6 ++++++ hw/bsp/stm32l0538disco/board.mk | 17 +++++++++-------- hw/bsp/stm32l0538disco/stm32l0538disco.c | 4 ++-- hw/mcu/st/cmsis_device_l0 | 1 + hw/mcu/st/stm32l0xx_hal_driver | 1 + 5 files changed, 19 insertions(+), 10 deletions(-) create mode 160000 hw/mcu/st/cmsis_device_l0 create mode 160000 hw/mcu/st/stm32l0xx_hal_driver diff --git a/.gitmodules b/.gitmodules index 6a75df141..3255977a2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -73,3 +73,9 @@ [submodule "hw/mcu/st/stm32h7xx_hal_driver"] path = hw/mcu/st/stm32h7xx_hal_driver url = https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_l0"] + path = hw/mcu/st/cmsis_device_l0 + url = https://github.com/STMicroelectronics/cmsis_device_l0.git +[submodule "hw/mcu/st/stm32l0xx_hal_driver"] + path = hw/mcu/st/stm32l0xx_hal_driver + url = https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git diff --git a/hw/bsp/stm32l0538disco/board.mk b/hw/bsp/stm32l0538disco/board.mk index bcfaee7ac..49818e3a3 100644 --- a/hw/bsp/stm32l0538disco/board.mk +++ b/hw/bsp/stm32l0538disco/board.mk @@ -12,19 +12,20 @@ CFLAGS += \ # mcu driver cause following warnings CFLAGS += -Wno-error=unused-parameter -Wno-error=maybe-uninitialized -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32L0xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32L0xx +ST_FAMILY = l0 +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)/STM32L053C8Tx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32l0xx.c \ - $(ST_HAL_DRIVER)/Src/stm32l0xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32l0xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32l0xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32l0xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32l0xx_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_stm32l053xx.s diff --git a/hw/bsp/stm32l0538disco/stm32l0538disco.c b/hw/bsp/stm32l0538disco/stm32l0538disco.c index ab04e5c51..f0f1d028b 100644 --- a/hw/bsp/stm32l0538disco/stm32l0538disco.c +++ b/hw/bsp/stm32l0538disco/stm32l0538disco.c @@ -127,7 +127,7 @@ void board_init(void) GPIO_InitStruct.Pin = LED_PIN; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_PULLUP; - GPIO_InitStruct.Speed = GPIO_SPEED_FAST; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; HAL_GPIO_Init(LED_PORT, &GPIO_InitStruct); board_led_write(false); @@ -137,7 +137,7 @@ void board_init(void) GPIO_InitStruct.Pin = BUTTON_PIN; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; GPIO_InitStruct.Pull = GPIO_PULLDOWN; - GPIO_InitStruct.Speed = GPIO_SPEED_FAST; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; HAL_GPIO_Init(BUTTON_PORT, &GPIO_InitStruct); // USB diff --git a/hw/mcu/st/cmsis_device_l0 b/hw/mcu/st/cmsis_device_l0 new file mode 160000 index 000000000..06748ca1f --- /dev/null +++ b/hw/mcu/st/cmsis_device_l0 @@ -0,0 +1 @@ +Subproject commit 06748ca1f93827befdb8b794402320d94d02004f diff --git a/hw/mcu/st/stm32l0xx_hal_driver b/hw/mcu/st/stm32l0xx_hal_driver new file mode 160000 index 000000000..fbdacaf6f --- /dev/null +++ b/hw/mcu/st/stm32l0xx_hal_driver @@ -0,0 +1 @@ +Subproject commit fbdacaf6f8c82a4e1eb9bd74ba650b491e97e17b From 3b890d2391de126a234aa08db05c7091f09fcbf6 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 14:01:05 +0700 Subject: [PATCH 10/14] l4 use offical st driver repo --- .gitmodules | 12 ++++++ hw/bsp/stm32l476disco/board.mk | 25 ++++++----- hw/bsp/stm32l476disco/stm32l4xx_hal_conf.h | 46 +++++++++++++++++++-- hw/bsp/stm32l4r5nucleo/board.mk | 24 ++++++----- hw/bsp/stm32l4r5nucleo/stm32l4xx_hal_conf.h | 43 +++++++++++++++++-- hw/mcu/st/cmsis_device_l1 | 1 + hw/mcu/st/cmsis_device_l4 | 1 + hw/mcu/st/stm32l1xx_hal_driver | 1 + hw/mcu/st/stm32l4xx_hal_driver | 1 + 9 files changed, 127 insertions(+), 27 deletions(-) create mode 160000 hw/mcu/st/cmsis_device_l1 create mode 160000 hw/mcu/st/cmsis_device_l4 create mode 160000 hw/mcu/st/stm32l1xx_hal_driver create mode 160000 hw/mcu/st/stm32l4xx_hal_driver diff --git a/.gitmodules b/.gitmodules index 3255977a2..939459286 100644 --- a/.gitmodules +++ b/.gitmodules @@ -79,3 +79,15 @@ [submodule "hw/mcu/st/stm32l0xx_hal_driver"] path = hw/mcu/st/stm32l0xx_hal_driver url = https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_l1"] + path = hw/mcu/st/cmsis_device_l1 + url = https://github.com/STMicroelectronics/cmsis_device_l1.git +[submodule "hw/mcu/st/stm32l1xx_hal_driver"] + path = hw/mcu/st/stm32l1xx_hal_driver + url = https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_l4"] + path = hw/mcu/st/cmsis_device_l4 + url = https://github.com/STMicroelectronics/cmsis_device_l4.git +[submodule "hw/mcu/st/stm32l4xx_hal_driver"] + path = hw/mcu/st/stm32l4xx_hal_driver + url = https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git diff --git a/hw/bsp/stm32l476disco/board.mk b/hw/bsp/stm32l476disco/board.mk index e2fc010dc..e79feda07 100644 --- a/hw/bsp/stm32l476disco/board.mk +++ b/hw/bsp/stm32l476disco/board.mk @@ -9,21 +9,26 @@ CFLAGS += \ -DSTM32L476xx \ -DCFG_TUSB_MCU=OPT_MCU_STM32L4 -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32L4xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32L4xx +# suppress warning caused by vendor mcu driver +CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align + +ST_FAMILY = l4 +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)/STM32L476VGTx_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32l4xx.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_pwr.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_pwr_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_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_pwr.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l476xx.s diff --git a/hw/bsp/stm32l476disco/stm32l4xx_hal_conf.h b/hw/bsp/stm32l476disco/stm32l4xx_hal_conf.h index dce4008d0..312f86da1 100644 --- a/hw/bsp/stm32l476disco/stm32l4xx_hal_conf.h +++ b/hw/bsp/stm32l476disco/stm32l4xx_hal_conf.h @@ -48,8 +48,8 @@ /* #define HAL_FIREWALL_MODULE_ENABLED */ #define HAL_FLASH_MODULE_ENABLED /* #define HAL_NAND_MODULE_ENABLED */ -#define HAL_NOR_MODULE_ENABLED -#define HAL_SRAM_MODULE_ENABLED +// #define HAL_NOR_MODULE_ENABLED +// #define HAL_SRAM_MODULE_ENABLED /* #define HAL_HCD_MODULE_ENABLED */ #define HAL_GPIO_MODULE_ENABLED //#define HAL_I2C_MODULE_ENABLED @@ -72,7 +72,7 @@ /* #define HAL_SWPMI_MODULE_ENABLED */ /* #define HAL_TIM_MODULE_ENABLED */ /* #define HAL_TSC_MODULE_ENABLED */ -//#define HAL_UART_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED /* #define HAL_USART_MODULE_ENABLED */ /* #define HAL_WWDG_MODULE_ENABLED */ @@ -172,6 +172,46 @@ #define INSTRUCTION_CACHE_ENABLE 1U #define DATA_CACHE_ENABLE 1U + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U /* HRTIM register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */ +#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U /* SWPMI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + /* ########################## Assert Selection ############################## */ /** * @brief Uncomment the line below to expanse the "assert_param" macro in the diff --git a/hw/bsp/stm32l4r5nucleo/board.mk b/hw/bsp/stm32l4r5nucleo/board.mk index 8ccefb7f8..57df89201 100644 --- a/hw/bsp/stm32l4r5nucleo/board.mk +++ b/hw/bsp/stm32l4r5nucleo/board.mk @@ -11,23 +11,25 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_STM32L4 # suppress warning caused by vendor mcu driver -CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align +CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align -ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32L4xx_HAL_Driver -ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32L4xx +ST_FAMILY = l4 +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)/STM32L4RXxI_FLASH.ld SRC_C += \ - $(ST_CMSIS)/Source/Templates/system_stm32l4xx.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_cortex.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_rcc.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_rcc_ex.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_gpio.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_uart.c \ - $(ST_HAL_DRIVER)/Src/stm32l4xx_hal_pwr_ex.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_pwr.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l4r5xx.s diff --git a/hw/bsp/stm32l4r5nucleo/stm32l4xx_hal_conf.h b/hw/bsp/stm32l4r5nucleo/stm32l4xx_hal_conf.h index 66822ff59..470ef1290 100644 --- a/hw/bsp/stm32l4r5nucleo/stm32l4xx_hal_conf.h +++ b/hw/bsp/stm32l4r5nucleo/stm32l4xx_hal_conf.h @@ -48,8 +48,8 @@ /* #define HAL_FIREWALL_MODULE_ENABLED */ #define HAL_FLASH_MODULE_ENABLED /* #define HAL_NAND_MODULE_ENABLED */ -#define HAL_NOR_MODULE_ENABLED -#define HAL_SRAM_MODULE_ENABLED +// #define HAL_NOR_MODULE_ENABLED +// #define HAL_SRAM_MODULE_ENABLED /* #define HAL_HCD_MODULE_ENABLED */ #define HAL_GPIO_MODULE_ENABLED //#define HAL_I2C_MODULE_ENABLED @@ -172,7 +172,44 @@ #define INSTRUCTION_CACHE_ENABLE 1U #define DATA_CACHE_ENABLE 1U -#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U /* HRTIM register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */ +#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U /* SWPMI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ /* ########################## Assert Selection ############################## */ /** diff --git a/hw/mcu/st/cmsis_device_l1 b/hw/mcu/st/cmsis_device_l1 new file mode 160000 index 000000000..7f16ec0a1 --- /dev/null +++ b/hw/mcu/st/cmsis_device_l1 @@ -0,0 +1 @@ +Subproject commit 7f16ec0a1c4c063f84160b4cc6bf88ad554a823e diff --git a/hw/mcu/st/cmsis_device_l4 b/hw/mcu/st/cmsis_device_l4 new file mode 160000 index 000000000..6ca7312fa --- /dev/null +++ b/hw/mcu/st/cmsis_device_l4 @@ -0,0 +1 @@ +Subproject commit 6ca7312fa6a5a460b5a5a63d66da527fdd8359a6 diff --git a/hw/mcu/st/stm32l1xx_hal_driver b/hw/mcu/st/stm32l1xx_hal_driver new file mode 160000 index 000000000..44efc446f --- /dev/null +++ b/hw/mcu/st/stm32l1xx_hal_driver @@ -0,0 +1 @@ +Subproject commit 44efc446fa69ed8344e7fd966e68ed11043b35d9 diff --git a/hw/mcu/st/stm32l4xx_hal_driver b/hw/mcu/st/stm32l4xx_hal_driver new file mode 160000 index 000000000..aee3d5bf2 --- /dev/null +++ b/hw/mcu/st/stm32l4xx_hal_driver @@ -0,0 +1 @@ +Subproject commit aee3d5bf283ae5df87532b781bdd01b7caf256fc From 6e7f2064cf8d5feaca9a59ce0593198a3fc29d12 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 14:04:46 +0700 Subject: [PATCH 11/14] add more stm mcu --- .gitmodules | 18 ++++++++++++++++++ hw/bsp/stm32l476disco/board.mk | 2 +- hw/mcu/st/cmsis_device_g0 | 1 + hw/mcu/st/cmsis_device_g4 | 1 + hw/mcu/st/cmsis_device_l5 | 1 + hw/mcu/st/stm32g0xx_hal_driver | 1 + hw/mcu/st/stm32g4xx_hal_driver | 1 + hw/mcu/st/stm32l5xx_hal_driver | 1 + 8 files changed, 25 insertions(+), 1 deletion(-) create mode 160000 hw/mcu/st/cmsis_device_g0 create mode 160000 hw/mcu/st/cmsis_device_g4 create mode 160000 hw/mcu/st/cmsis_device_l5 create mode 160000 hw/mcu/st/stm32g0xx_hal_driver create mode 160000 hw/mcu/st/stm32g4xx_hal_driver create mode 160000 hw/mcu/st/stm32l5xx_hal_driver diff --git a/.gitmodules b/.gitmodules index 939459286..81ba7f068 100644 --- a/.gitmodules +++ b/.gitmodules @@ -91,3 +91,21 @@ [submodule "hw/mcu/st/stm32l4xx_hal_driver"] path = hw/mcu/st/stm32l4xx_hal_driver url = https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_g0"] + path = hw/mcu/st/cmsis_device_g0 + url = https://github.com/STMicroelectronics/cmsis_device_g0.git +[submodule "hw/mcu/st/stm32g0xx_hal_driver"] + path = hw/mcu/st/stm32g0xx_hal_driver + url = https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_g4"] + path = hw/mcu/st/cmsis_device_g4 + url = https://github.com/STMicroelectronics/cmsis_device_g4.git +[submodule "hw/mcu/st/stm32g4xx_hal_driver"] + path = hw/mcu/st/stm32g4xx_hal_driver + url = https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git +[submodule "hw/mcu/st/cmsis_device_l5"] + path = hw/mcu/st/cmsis_device_l5 + url = https://github.com/STMicroelectronics/cmsis_device_l5.git +[submodule "hw/mcu/st/stm32l5xx_hal_driver"] + path = hw/mcu/st/stm32l5xx_hal_driver + url = https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git diff --git a/hw/bsp/stm32l476disco/board.mk b/hw/bsp/stm32l476disco/board.mk index e79feda07..fb55dbb5b 100644 --- a/hw/bsp/stm32l476disco/board.mk +++ b/hw/bsp/stm32l476disco/board.mk @@ -10,7 +10,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_STM32L4 # suppress warning caused by vendor mcu driver -CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align +CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align ST_FAMILY = l4 ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) diff --git a/hw/mcu/st/cmsis_device_g0 b/hw/mcu/st/cmsis_device_g0 new file mode 160000 index 000000000..08258b28e --- /dev/null +++ b/hw/mcu/st/cmsis_device_g0 @@ -0,0 +1 @@ +Subproject commit 08258b28ee95f50cb9624d152a1cbf084be1f9a5 diff --git a/hw/mcu/st/cmsis_device_g4 b/hw/mcu/st/cmsis_device_g4 new file mode 160000 index 000000000..ce822adb1 --- /dev/null +++ b/hw/mcu/st/cmsis_device_g4 @@ -0,0 +1 @@ +Subproject commit ce822adb1dc552b3aedd13621edbc7fdae124878 diff --git a/hw/mcu/st/cmsis_device_l5 b/hw/mcu/st/cmsis_device_l5 new file mode 160000 index 000000000..d922865fc --- /dev/null +++ b/hw/mcu/st/cmsis_device_l5 @@ -0,0 +1 @@ +Subproject commit d922865fc0326a102c26211c44b8e42f52c1e53d diff --git a/hw/mcu/st/stm32g0xx_hal_driver b/hw/mcu/st/stm32g0xx_hal_driver new file mode 160000 index 000000000..5b53e6cee --- /dev/null +++ b/hw/mcu/st/stm32g0xx_hal_driver @@ -0,0 +1 @@ +Subproject commit 5b53e6cee664a82b16c86491aa0060e2110c00cb diff --git a/hw/mcu/st/stm32g4xx_hal_driver b/hw/mcu/st/stm32g4xx_hal_driver new file mode 160000 index 000000000..8b4518417 --- /dev/null +++ b/hw/mcu/st/stm32g4xx_hal_driver @@ -0,0 +1 @@ +Subproject commit 8b4518417706d42eef5c14e56a650005abf478a8 diff --git a/hw/mcu/st/stm32l5xx_hal_driver b/hw/mcu/st/stm32l5xx_hal_driver new file mode 160000 index 000000000..675c32a75 --- /dev/null +++ b/hw/mcu/st/stm32l5xx_hal_driver @@ -0,0 +1 @@ +Subproject commit 675c32a75df37f39d50d61f51cb0dcf53f07e1cb From 4f3ac8c492e5b45bed3270b80e4efe7c00a46a0e Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 14:08:54 +0700 Subject: [PATCH 12/14] add CMSIS_5 submodule --- .gitmodules | 3 +++ lib/CMSIS_5 | 1 + 2 files changed, 4 insertions(+) create mode 160000 lib/CMSIS_5 diff --git a/.gitmodules b/.gitmodules index 81ba7f068..965bbb69e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -109,3 +109,6 @@ [submodule "hw/mcu/st/stm32l5xx_hal_driver"] path = hw/mcu/st/stm32l5xx_hal_driver url = https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git +[submodule "lib/CMSIS_5"] + path = lib/CMSIS_5 + url = https://github.com/ARM-software/CMSIS_5.git diff --git a/lib/CMSIS_5 b/lib/CMSIS_5 new file mode 160000 index 000000000..b7b26f50d --- /dev/null +++ b/lib/CMSIS_5 @@ -0,0 +1 @@ +Subproject commit b7b26f50d00072812aec8453f643e24bafedccb5 From a6efe475e7b68b5fbba371a1a73ecf474ef226c4 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 14:14:28 +0700 Subject: [PATCH 13/14] use cmsis 5 for all stm32 --- hw/bsp/feather_stm32f405/board.mk | 2 +- hw/bsp/pyboardv11/board.mk | 2 +- hw/bsp/stlinkv3mini/board.mk | 2 +- hw/bsp/stm32f070rbnucleo/board.mk | 2 +- hw/bsp/stm32f072disco/board.mk | 2 +- hw/bsp/stm32f103bluepill/board.mk | 2 +- hw/bsp/stm32f207nucleo/board.mk | 2 +- hw/bsp/stm32f303disco/board.mk | 2 +- hw/bsp/stm32f401blackpill/board.mk | 2 +- hw/bsp/stm32f407disco/board.mk | 2 +- hw/bsp/stm32f411blackpill/board.mk | 2 +- hw/bsp/stm32f411disco/board.mk | 2 +- hw/bsp/stm32f412disco/board.mk | 2 +- hw/bsp/stm32f723disco/board.mk | 2 +- hw/bsp/stm32f746disco/board.mk | 2 +- hw/bsp/stm32f746nucleo/board.mk | 2 +- hw/bsp/stm32f767nucleo/board.mk | 2 +- hw/bsp/stm32f769disco/board.mk | 2 +- hw/bsp/stm32h743eval/board.mk | 2 +- hw/bsp/stm32h743nucleo/board.mk | 2 +- hw/bsp/stm32h745disco/board.mk | 2 +- hw/bsp/stm32l0538disco/board.mk | 2 +- hw/bsp/stm32l476disco/board.mk | 2 +- hw/bsp/stm32l4r5nucleo/board.mk | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/hw/bsp/feather_stm32f405/board.mk b/hw/bsp/feather_stm32f405/board.mk index fdba8cd0d..3a2134875 100644 --- a/hw/bsp/feather_stm32f405/board.mk +++ b/hw/bsp/feather_stm32f405/board.mk @@ -31,7 +31,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/pyboardv11/board.mk b/hw/bsp/pyboardv11/board.mk index aa185ae3c..a8fc2ca1e 100644 --- a/hw/bsp/pyboardv11/board.mk +++ b/hw/bsp/pyboardv11/board.mk @@ -27,7 +27,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stlinkv3mini/board.mk b/hw/bsp/stlinkv3mini/board.mk index 5157fbf14..fb8b6b29f 100644 --- a/hw/bsp/stlinkv3mini/board.mk +++ b/hw/bsp/stlinkv3mini/board.mk @@ -47,7 +47,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f723xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f070rbnucleo/board.mk b/hw/bsp/stm32f070rbnucleo/board.mk index 70aeccc0b..be2ce3b83 100644 --- a/hw/bsp/stm32f070rbnucleo/board.mk +++ b/hw/bsp/stm32f070rbnucleo/board.mk @@ -32,7 +32,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f070xb.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f072disco/board.mk b/hw/bsp/stm32f072disco/board.mk index 4b73b570b..bbb7baf5a 100644 --- a/hw/bsp/stm32f072disco/board.mk +++ b/hw/bsp/stm32f072disco/board.mk @@ -32,7 +32,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f103bluepill/board.mk b/hw/bsp/stm32f103bluepill/board.mk index 8ab973776..8dc1fa3f5 100644 --- a/hw/bsp/stm32f103bluepill/board.mk +++ b/hw/bsp/stm32f103bluepill/board.mk @@ -30,7 +30,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f103xb.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f207nucleo/board.mk b/hw/bsp/stm32f207nucleo/board.mk index cad816d9f..025c2d7b7 100644 --- a/hw/bsp/stm32f207nucleo/board.mk +++ b/hw/bsp/stm32f207nucleo/board.mk @@ -31,7 +31,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f207xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f303disco/board.mk b/hw/bsp/stm32f303disco/board.mk index 3459c28af..3abaf5cec 100644 --- a/hw/bsp/stm32f303disco/board.mk +++ b/hw/bsp/stm32f303disco/board.mk @@ -31,7 +31,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f303xc.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f401blackpill/board.mk b/hw/bsp/stm32f401blackpill/board.mk index 3d52a79ed..522b02774 100644 --- a/hw/bsp/stm32f401blackpill/board.mk +++ b/hw/bsp/stm32f401blackpill/board.mk @@ -27,7 +27,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f401xc.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f407disco/board.mk b/hw/bsp/stm32f407disco/board.mk index 542588fc2..76e13af32 100644 --- a/hw/bsp/stm32f407disco/board.mk +++ b/hw/bsp/stm32f407disco/board.mk @@ -31,7 +31,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f407xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f411blackpill/board.mk b/hw/bsp/stm32f411blackpill/board.mk index 5b7a70017..5800331d9 100644 --- a/hw/bsp/stm32f411blackpill/board.mk +++ b/hw/bsp/stm32f411blackpill/board.mk @@ -27,7 +27,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f411disco/board.mk b/hw/bsp/stm32f411disco/board.mk index cea8d2cdb..e13bf641e 100644 --- a/hw/bsp/stm32f411disco/board.mk +++ b/hw/bsp/stm32f411disco/board.mk @@ -31,7 +31,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f412disco/board.mk b/hw/bsp/stm32f412disco/board.mk index d991c4b75..9356f344d 100644 --- a/hw/bsp/stm32f412disco/board.mk +++ b/hw/bsp/stm32f412disco/board.mk @@ -32,7 +32,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f412zx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f723disco/board.mk b/hw/bsp/stm32f723disco/board.mk index 50c25810f..b784c3742 100644 --- a/hw/bsp/stm32f723disco/board.mk +++ b/hw/bsp/stm32f723disco/board.mk @@ -50,7 +50,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f723xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f746disco/board.mk b/hw/bsp/stm32f746disco/board.mk index 95feac1f6..e02dbc3f5 100644 --- a/hw/bsp/stm32f746disco/board.mk +++ b/hw/bsp/stm32f746disco/board.mk @@ -50,7 +50,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f746xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f746nucleo/board.mk b/hw/bsp/stm32f746nucleo/board.mk index 140e2d639..e7b240240 100644 --- a/hw/bsp/stm32f746nucleo/board.mk +++ b/hw/bsp/stm32f746nucleo/board.mk @@ -33,7 +33,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f746xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f767nucleo/board.mk b/hw/bsp/stm32f767nucleo/board.mk index c6be2bcbf..9a6bada05 100644 --- a/hw/bsp/stm32f767nucleo/board.mk +++ b/hw/bsp/stm32f767nucleo/board.mk @@ -33,7 +33,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f767xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32f769disco/board.mk b/hw/bsp/stm32f769disco/board.mk index ced2240c0..a963b905b 100644 --- a/hw/bsp/stm32f769disco/board.mk +++ b/hw/bsp/stm32f769disco/board.mk @@ -47,7 +47,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f769xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32h743eval/board.mk b/hw/bsp/stm32h743eval/board.mk index 87de060c5..7f42e1a88 100644 --- a/hw/bsp/stm32h743eval/board.mk +++ b/hw/bsp/stm32h743eval/board.mk @@ -44,7 +44,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32h743nucleo/board.mk b/hw/bsp/stm32h743nucleo/board.mk index eade0f09a..2a5ed8fc2 100644 --- a/hw/bsp/stm32h743nucleo/board.mk +++ b/hw/bsp/stm32h743nucleo/board.mk @@ -33,7 +33,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32h745disco/board.mk b/hw/bsp/stm32h745disco/board.mk index 8489748c7..78f22a5a2 100644 --- a/hw/bsp/stm32h745disco/board.mk +++ b/hw/bsp/stm32h745disco/board.mk @@ -39,7 +39,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h745xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32l0538disco/board.mk b/hw/bsp/stm32l0538disco/board.mk index 49818e3a3..9e3423fbc 100644 --- a/hw/bsp/stm32l0538disco/board.mk +++ b/hw/bsp/stm32l0538disco/board.mk @@ -31,7 +31,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l053xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32l476disco/board.mk b/hw/bsp/stm32l476disco/board.mk index fb55dbb5b..994849d9e 100644 --- a/hw/bsp/stm32l476disco/board.mk +++ b/hw/bsp/stm32l476disco/board.mk @@ -34,7 +34,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l476xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) diff --git a/hw/bsp/stm32l4r5nucleo/board.mk b/hw/bsp/stm32l4r5nucleo/board.mk index 57df89201..cee5ce86e 100644 --- a/hw/bsp/stm32l4r5nucleo/board.mk +++ b/hw/bsp/stm32l4r5nucleo/board.mk @@ -35,7 +35,7 @@ SRC_S += \ $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l4r5xx.s INC += \ - $(TOP)/hw/mcu/st/st_driver/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) From 1e7af854c209cb707c299024c7dcfb80125bef54 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 30 Oct 2020 14:21:29 +0700 Subject: [PATCH 14/14] remove st_driver submodule --- .gitmodules | 3 --- hw/mcu/st/st_driver | 1 - 2 files changed, 4 deletions(-) delete mode 160000 hw/mcu/st/st_driver diff --git a/.gitmodules b/.gitmodules index 965bbb69e..dd55bdc0c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,6 @@ [submodule "tools/uf2"] path = tools/uf2 url = https://github.com/microsoft/uf2.git -[submodule "hw/mcu/st/st_driver"] - path = hw/mcu/st/st_driver - url = https://github.com/hathach/st_driver.git [submodule "hw/mcu/sony/cxd56/spresense-exported-sdk"] path = hw/mcu/sony/cxd56/spresense-exported-sdk url = https://github.com/sonydevworld/spresense-exported-sdk.git diff --git a/hw/mcu/st/st_driver b/hw/mcu/st/st_driver deleted file mode 160000 index ceb49a6f2..000000000 --- a/hw/mcu/st/st_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ceb49a6f2d4afbf88ed29de94bb86095f41761ac