summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-01-13 13:20:09 +0700
committerhathach <[email protected]>2021-01-13 13:20:09 +0700
commit55566bb188332ecb41dcbfb2f52aa6d8891ca130 (patch)
tree54045249ae476452577f2876bd54a6dd0b73a974 /hw
parent8c5c46454fdcc43faf04d8c3dd41434f7fd0122e (diff)
adding stm32f7 family
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/stm32f7/boards/stm32f723disco/STM32F723xE_FLASH.ld (renamed from hw/bsp/stm32f723disco/STM32F723xE_FLASH.ld)0
-rw-r--r--hw/bsp/stm32f7/boards/stm32f723disco/board.mk12
-rw-r--r--hw/bsp/stm32f7/boards/stm32f723disco/stm32f7xx_hal_conf.h (renamed from hw/bsp/stm32f723disco/stm32f7xx_hal_conf.h)0
-rw-r--r--hw/bsp/stm32f7/family.c (renamed from hw/bsp/stm32f723disco/stm32f723disco.c)0
-rw-r--r--hw/bsp/stm32f7/family.mk (renamed from hw/bsp/stm32f723disco/board.mk)15
5 files changed, 14 insertions, 13 deletions
diff --git a/hw/bsp/stm32f723disco/STM32F723xE_FLASH.ld b/hw/bsp/stm32f7/boards/stm32f723disco/STM32F723xE_FLASH.ld
index 8645ce5c5..8645ce5c5 100644
--- a/hw/bsp/stm32f723disco/STM32F723xE_FLASH.ld
+++ b/hw/bsp/stm32f7/boards/stm32f723disco/STM32F723xE_FLASH.ld
diff --git a/hw/bsp/stm32f7/boards/stm32f723disco/board.mk b/hw/bsp/stm32f7/boards/stm32f723disco/board.mk
new file mode 100644
index 000000000..8f05199d0
--- /dev/null
+++ b/hw/bsp/stm32f7/boards/stm32f723disco/board.mk
@@ -0,0 +1,12 @@
+PORT ?= 1
+SPEED ?= high
+
+CFLAGS += \
+ -DSTM32F723xx \
+ -DHSE_VALUE=25000000 \
+
+LD_FILE = $(BOARD_PATH)/STM32F723xE_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f723xx.s
+
+# flash target using on-board stlink
+flash: flash-stlink
diff --git a/hw/bsp/stm32f723disco/stm32f7xx_hal_conf.h b/hw/bsp/stm32f7/boards/stm32f723disco/stm32f7xx_hal_conf.h
index 581f0e46a..581f0e46a 100644
--- a/hw/bsp/stm32f723disco/stm32f7xx_hal_conf.h
+++ b/hw/bsp/stm32f7/boards/stm32f723disco/stm32f7xx_hal_conf.h
diff --git a/hw/bsp/stm32f723disco/stm32f723disco.c b/hw/bsp/stm32f7/family.c
index eeedd2a66..eeedd2a66 100644
--- a/hw/bsp/stm32f723disco/stm32f723disco.c
+++ b/hw/bsp/stm32f7/family.c
diff --git a/hw/bsp/stm32f723disco/board.mk b/hw/bsp/stm32f7/family.mk
index b784c3742..b5f58cf93 100644
--- a/hw/bsp/stm32f723disco/board.mk
+++ b/hw/bsp/stm32f7/family.mk
@@ -1,5 +1,4 @@
-PORT ?= 1
-SPEED ?= high
+include $(TOP)/$(BOARD_PATH)/board.mk
CFLAGS += \
-flto \
@@ -9,8 +8,6 @@ CFLAGS += \
-mfloat-abi=hard \
-mfpu=fpv5-d16 \
-nostdlib -nostartfiles \
- -DSTM32F723xx \
- -DHSE_VALUE=25000000 \
-DCFG_TUSB_MCU=OPT_MCU_STM32F7 \
-DBOARD_DEVICE_RHPORT_NUM=$(PORT)
@@ -33,9 +30,6 @@ 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_stm32$(ST_FAMILY)xx.c \
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \
@@ -46,10 +40,8 @@ SRC_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
-
INC += \
+ $(TOP)/$(BOARD_PATH) \
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
$(TOP)/$(ST_CMSIS)/Include \
$(TOP)/$(ST_HAL_DRIVER)/Inc \
@@ -61,6 +53,3 @@ CHIP_FAMILY = synopsys
# For freeRTOS port source
FREERTOS_PORT = ARM_CM7/r0p1
-
-# flash target using on-board stlink
-flash: flash-stlink