adding stm32f7 family

This commit is contained in:
hathach 2021-01-13 13:20:09 +07:00
parent 8c5c46454f
commit 55566bb188
5 changed files with 14 additions and 13 deletions

View File

@ -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

View File

@ -1,5 +1,4 @@
PORT ?= 1 include $(TOP)/$(BOARD_PATH)/board.mk
SPEED ?= high
CFLAGS += \ CFLAGS += \
-flto \ -flto \
@ -9,8 +8,6 @@ CFLAGS += \
-mfloat-abi=hard \ -mfloat-abi=hard \
-mfpu=fpv5-d16 \ -mfpu=fpv5-d16 \
-nostdlib -nostartfiles \ -nostdlib -nostartfiles \
-DSTM32F723xx \
-DHSE_VALUE=25000000 \
-DCFG_TUSB_MCU=OPT_MCU_STM32F7 \ -DCFG_TUSB_MCU=OPT_MCU_STM32F7 \
-DBOARD_DEVICE_RHPORT_NUM=$(PORT) -DBOARD_DEVICE_RHPORT_NUM=$(PORT)
@ -33,9 +30,6 @@ ST_FAMILY = f7
ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver 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 += \ SRC_C += \
$(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.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.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_uart.c \
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c
SRC_S += \
$(ST_CMSIS)/Source/Templates/gcc/startup_stm32f723xx.s
INC += \ INC += \
$(TOP)/$(BOARD_PATH) \
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
$(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_CMSIS)/Include \
$(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/$(ST_HAL_DRIVER)/Inc \
@ -61,6 +53,3 @@ CHIP_FAMILY = synopsys
# For freeRTOS port source # For freeRTOS port source
FREERTOS_PORT = ARM_CM7/r0p1 FREERTOS_PORT = ARM_CM7/r0p1
# flash target using on-board stlink
flash: flash-stlink