forked from am32-firmware/AM32-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathf421makefile.mk
More file actions
27 lines (20 loc) · 772 Bytes
/
f421makefile.mk
File metadata and controls
27 lines (20 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
MCU := F421
PART := AT32F421K8U7
MCU_LC := $(call lc,$(MCU))
HAL_FOLDER_$(MCU) := $(HAL_FOLDER)/$(MCU_LC)
MCU_$(MCU) := -mcpu=cortex-m4 -mthumb
LDSCRIPT_$(MCU) := $(wildcard $(HAL_FOLDER_$(MCU))/*.ld)
SRC_BASE_DIR_$(MCU) := \
$(HAL_FOLDER_$(MCU))/Startup \
$(HAL_FOLDER_$(MCU))/Drivers/drivers/src
CFLAGS_$(MCU) := \
-I$(HAL_FOLDER_$(MCU))/Inc \
-I$(HAL_FOLDER_$(MCU))/Drivers/drivers/inc \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/cm4/core_support \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/cm4/device_support
CFLAGS_$(MCU) += \
-D$(PART) \
-DUSE_STDPERIPH_DRIVER
SRC_$(MCU) := $(foreach dir,$(SRC_DIR_$(MCU)),$(wildcard $(dir)/*.[cs]))
SRC_$(MCU)_BL := $(foreach dir,$(SRC_BASE_DIR_$(MCU)),$(wildcard $(dir)/*.[cs])) \
$(wildcard $(HAL_FOLDER_$(MCU))/Src/*.c)