forked from am32-firmware/AM32
-
Notifications
You must be signed in to change notification settings - Fork 0
/
e230makefile.mk
31 lines (22 loc) · 852 Bytes
/
e230makefile.mk
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
28
29
30
31
MCU := E230
PART := GD32E230
TARGETS_$(MCU) := $(call get_targets,$(MCU))
HAL_FOLDER_$(MCU) := $(HAL_FOLDER)/$(call lc,$(MCU))
MCU_$(MCU) := -mfloat-abi=soft -mthumb -mcpu=cortex-m23
LDSCRIPT_$(MCU) := $(wildcard $(HAL_FOLDER_$(MCU))/*.ld)
SRC_BASE_DIR_$(MCU) := \
$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/Source \
$(HAL_FOLDER_$(MCU))/Drivers/GD32E23x_standard_peripheral/Source \
$(HAL_FOLDER_$(MCU))/Startup
SRC_DIR_$(MCU) := $(SRC_BASE_DIR_$(MCU)) \
$(HAL_FOLDER_$(MCU))/Src
CFLAGS_$(MCU) += \
-I$(HAL_FOLDER_$(MCU))/Inc \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/Include \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/Core/Include \
-I$(HAL_FOLDER_$(MCU))/Drivers/GD32E23x_standard_peripheral/Include
CFLAGS_$(MCU) += \
-DGD32$(MCU) \
-D$(PART) \
-DUSE_STDPERIPH_DRIVER
SRC_$(MCU) := $(foreach dir,$(SRC_DIR_$(MCU)),$(wildcard $(dir)/*.[cs]))