8000 stm32/mboot: Use startup file from stm32lib. · andrewleech/micropython@eb0ba31 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb0ba31

Browse files
committed
stm32/mboot: Use startup file from stm32lib.
1 parent 48d952e commit eb0ba31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ports/stm32/mboot/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ include $(BOARD_DIR)/mpconfigboard.mk
2222

2323
CMSIS_DIR=$(TOP)/lib/stm32lib/CMSIS/STM32$(MCU_SERIES_UPPER)xx/Include
2424
MCU_SERIES_UPPER = $(shell echo $(MCU_SERIES) | tr '[:lower:]' '[:upper:]')
25+
CMSIS_MCU_LOWER = $(shell echo $(CMSIS_MCU) | tr '[:upper:]' '[:lower:]')
2526
HAL_DIR=lib/stm32lib/STM32$(MCU_SERIES_UPPER)xx_HAL_Driver
2627
USBDEV_DIR=usbdev
2728
DFU=$(TOP)/tools/dfu.py
@@ -30,6 +31,7 @@ DEVICE=0483:df11
3031
STFLASH ?= st-flash
3132
OPENOCD ?= openocd
3233
OPENOCD_CONFIG ?= boards/openocd_stm32f4.cfg
34+
STARTUP_FILE ?= lib/stm32lib/CMSIS/STM32$(MCU_SERIES_UPPER)xx/Source/Templates/gcc/startup_$(CMSIS_MCU_LOWER).o
3335

3436
CROSS_COMPILE = arm-none-eabi-
3537

@@ -101,7 +103,7 @@ SRC_C = \
101103
$(wildcard $(BOARD_DIR)/*.c)
102104

103105
SRC_O = \
104-
ports/stm32/boards/startup_stm32$(MCU_SERIES).o \
106+
$(STARTUP_FILE) \
105107
ports/stm32/resethandler.o \
106108

107109
$(BUILD)/$(HAL_DIR)/Src/stm32$(MCU_SERIES)xx_ll_usb.o: CFLAGS += -Wno-attributes

0 commit comments

Comments
 (0)
0