summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-06-24 20:17:48 +0700
committerhathach <[email protected]>2023-06-24 20:17:48 +0700
commiteb4380fa14a4cdbd8dde92da74c223b458662dc9 (patch)
treefefbb5338b9140820e02eaca3afc6685fca4bc69 /hw
parent2216704db8801b359659bf191ae955e4c626f031 (diff)
more make update
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk2
-rw-r--r--hw/bsp/stm32f0/boards/stm32f072eval/board.mk7
-rw-r--r--hw/bsp/stm32f7/boards/stlinkv3mini/board.mk9
-rw-r--r--hw/bsp/stm32f7/boards/stm32f723disco/board.mk9
-rw-r--r--hw/bsp/stm32f7/boards/stm32f746disco/board.mk9
-rw-r--r--hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk9
-rw-r--r--hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk9
-rw-r--r--hw/bsp/stm32f7/boards/stm32f769disco/board.mk9
-rw-r--r--hw/bsp/stm32f7/family.mk7
9 files changed, 30 insertions, 40 deletions
diff --git a/hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk b/hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk
index f8f0952e8..63f6a31c2 100644
--- a/hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk
+++ b/hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk
@@ -1,3 +1,5 @@
+MCU_VARIANT = stm32f070xb
+
CFLAGS += -DSTM32F070xB -DCFG_EXAMPLE_VIDEO_READONLY
# Linker
diff --git a/hw/bsp/stm32f0/boards/stm32f072eval/board.mk b/hw/bsp/stm32f0/boards/stm32f072eval/board.mk
index c368bd8af..bab889524 100644
--- a/hw/bsp/stm32f0/boards/stm32f072eval/board.mk
+++ b/hw/bsp/stm32f0/boards/stm32f072eval/board.mk
@@ -1,11 +1,10 @@
+MCU_VARIANT = stm32f072xb
+
CFLAGS += -DSTM32F072xB -DLSI_VALUE=40000 -DCFG_EXAMPLE_VIDEO_READONLY
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s
+# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32F072VBTx_FLASH.ld
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f072xb.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f072xb_flash.icf
-
# For flash-jlink target
JLINK_DEVICE = stm32f072vb
diff --git a/hw/bsp/stm32f7/boards/stlinkv3mini/board.mk b/hw/bsp/stm32f7/boards/stlinkv3mini/board.mk
index b59125edc..94dce5e84 100644
--- a/hw/bsp/stm32f7/boards/stlinkv3mini/board.mk
+++ b/hw/bsp/stm32f7/boards/stlinkv3mini/board.mk
@@ -1,3 +1,5 @@
+MCU_VARIANT = stm32f723xx
+
# Only OTG-HS has a connector on this board
PORT ?= 1
SPEED ?= high
@@ -6,13 +8,8 @@ CFLAGS += \
-DSTM32F723xx \
-DHSE_VALUE=25000000 \
-# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f723xx.s
+# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32F723xE_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f723xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f723xx_flash.icf
-
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32f7/boards/stm32f723disco/board.mk b/hw/bsp/stm32f7/boards/stm32f723disco/board.mk
index 168ca5dad..43e8eafe1 100644
--- a/hw/bsp/stm32f7/boards/stm32f723disco/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f723disco/board.mk
@@ -1,3 +1,5 @@
+MCU_VARIANT = stm32f723xx
+
PORT ?= 1
SPEED ?= high
@@ -5,13 +7,8 @@ CFLAGS += \
-DSTM32F723xx \
-DHSE_VALUE=25000000 \
-# GCC
+# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32F723xE_FLASH.ld
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f723xx.s
-
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f723xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f723xx_flash.icf
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32f7/boards/stm32f746disco/board.mk b/hw/bsp/stm32f7/boards/stm32f746disco/board.mk
index acda5e2e8..61c0aaa7d 100644
--- a/hw/bsp/stm32f7/boards/stm32f746disco/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f746disco/board.mk
@@ -1,3 +1,5 @@
+MCU_VARIANT = stm32f746xx
+
PORT ?= 1
SPEED ?= high
@@ -5,13 +7,8 @@ CFLAGS += \
-DSTM32F746xx \
-DHSE_VALUE=25000000
-# GCC
+# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32F746ZGTx_FLASH.ld
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f746xx.s
-
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f746xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f746xx_flash.icf
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk b/hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk
index 511433885..3683c79a5 100644
--- a/hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk
@@ -1,3 +1,5 @@
+MCU_VARIANT = stm32f746xx
+
PORT ?= 0
SPEED ?= full
@@ -5,13 +7,8 @@ CFLAGS += \
-DSTM32F746xx \
-DHSE_VALUE=8000000
-# GCC
+# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32F746ZGTx_FLASH.ld
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f746xx.s
-
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f746xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f746xx_flash.icf
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk b/hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk
index 329771986..059ad166a 100644
--- a/hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk
@@ -1,3 +1,5 @@
+MCU_VARIANT = stm32f767xx
+
PORT ?= 0
SPEED ?= full
@@ -5,13 +7,8 @@ CFLAGS += \
-DSTM32F767xx \
-DHSE_VALUE=8000000 \
-# GCC
+# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32F767ZITx_FLASH.ld
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f767xx.s
-
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f767xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f767xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f767zi
diff --git a/hw/bsp/stm32f7/boards/stm32f769disco/board.mk b/hw/bsp/stm32f7/boards/stm32f769disco/board.mk
index 20042db98..a45af8cc0 100644
--- a/hw/bsp/stm32f7/boards/stm32f769disco/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f769disco/board.mk
@@ -1,3 +1,5 @@
+MCU_VARIANT = stm32f769xx
+
# Only OTG-HS has a connector on this board
PORT ?= 1
SPEED ?= high
@@ -6,13 +8,8 @@ CFLAGS += \
-DSTM32F769xx \
-DHSE_VALUE=25000000 \
-# GCC
+# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32F769ZITx_FLASH.ld
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f769xx.s
-
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f769xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f769xx_flash.icf
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32f7/family.mk b/hw/bsp/stm32f7/family.mk
index 1a15a743c..4a699ea31 100644
--- a/hw/bsp/stm32f7/family.mk
+++ b/hw/bsp/stm32f7/family.mk
@@ -56,3 +56,10 @@ INC += \
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
$(TOP)/$(ST_CMSIS)/Include \
$(TOP)/$(ST_HAL_DRIVER)/Inc
+
+# Startup
+SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
+SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+
+# Linker
+LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf