aboutsummaryrefslogtreecommitdiff
path: root/stmhal/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/Makefile')
-rw-r--r--stmhal/Makefile62
1 files changed, 31 insertions, 31 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile
index a923ade4a..4931ebf80 100644
--- a/stmhal/Makefile
+++ b/stmhal/Makefile
@@ -19,7 +19,7 @@ QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
include ../py/py.mk
CMSIS_DIR=cmsis
-HAL_DIR=hal
+HAL_DIR=hal/$(MCU_SERIES)
USBDEV_DIR=usbdev
#USBHOST_DIR=usbhost
FATFS_DIR=lib/fatfs
@@ -158,35 +158,35 @@ SRC_S = \
startup_stm32f40xx.s \
gchelper.s \
-SRC_HAL = $(addprefix $(HAL_DIR)/src/,\
- stm32f4xx_hal.c \
- stm32f4xx_hal_adc.c \
- stm32f4xx_hal_adc_ex.c \
- stm32f4xx_hal_can.c \
- stm32f4xx_hal_cortex.c \
- stm32f4xx_hal_dac.c \
- stm32f4xx_hal_dac_ex.c \
- stm32f4xx_hal_dma.c \
- stm32f4xx_hal_flash.c \
- stm32f4xx_hal_flash_ex.c \
- stm32f4xx_hal_gpio.c \
- stm32f4xx_hal_i2c.c \
- stm32f4xx_hal_pcd.c \
- stm32f4xx_hal_pcd_ex.c \
- stm32f4xx_hal_pwr.c \
- stm32f4xx_hal_pwr_ex.c \
- stm32f4xx_hal_rcc.c \
- stm32f4xx_hal_rcc_ex.c \
- stm32f4xx_hal_rng.c \
- stm32f4xx_hal_rtc.c \
- stm32f4xx_hal_rtc_ex.c \
- stm32f4xx_hal_sd.c \
- stm32f4xx_hal_spi.c \
- stm32f4xx_hal_tim.c \
- stm32f4xx_hal_tim_ex.c \
- stm32f4xx_hal_uart.c \
- stm32f4xx_ll_sdmmc.c \
- stm32f4xx_ll_usb.c \
+SRC_HAL = $(addprefix $(HAL_DIR)/src/stm32$(MCU_SERIES)xx_,\
+ hal.c \
+ hal_adc.c \
+ hal_adc_ex.c \
+ hal_can.c \
+ hal_cortex.c \
+ hal_dac.c \
+ hal_dac_ex.c \
+ hal_dma.c \
+ hal_flash.c \
+ hal_flash_ex.c \
+ hal_gpio.c \
+ hal_i2c.c \
+ hal_pcd.c \
+ hal_pcd_ex.c \
+ hal_pwr.c \
+ hal_pwr_ex.c \
+ hal_rcc.c \
+ hal_rcc_ex.c \
+ hal_rng.c \
+ hal_rtc.c \
+ hal_rtc_ex.c \
+ hal_sd.c \
+ hal_spi.c \
+ hal_tim.c \
+ hal_tim_ex.c \
+ hal_uart.c \
+ ll_sdmmc.c \
+ ll_usb.c \
)
SRC_USBDEV = $(addprefix $(USBDEV_DIR)/,\
@@ -250,7 +250,7 @@ OBJ += $(BUILD)/pins_$(BOARD).o
# to be compiled with -O0, then edit stm32f405.ld (in the .isr_vector section)
# and comment out the following 2 lines.
$(BUILD)/$(FATFS_DIR)/ff.o: COPT += -Os
-$(BUILD)/$(HAL_DIR)/src/stm32f4xx_hal_sd.o: COPT += -Os
+$(BUILD)/$(HAL_DIR)/src/stm32$(MCU_SERIES)xx_hal_sd.o: COPT += -Os
all: $(BUILD)/firmware.dfu $(BUILD)/firmware.hex