forked from AlkaMotors/AM32-MultiRotor-ESC-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gd32makefile.mk
33 lines (26 loc) · 822 Bytes
/
gd32makefile.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
32
33
TARGETS_GD32 := \
GD32TEST
HAL_FOLDER_GD32 := $(HAL_FOLDER)/f350
MCU_GD32 := -mcpu=cortex-m4 -mthumb
LDSCRIPT_GD32 := $(HAL_FOLDER_GD32)/STM32F302CBTX_FLASH.ld
SRC_DIR_GD32 := \
$(HAL_FOLDER_GD32)/Startup \
$(HAL_FOLDER_GD32)/Src \
$(HAL_FOLDER_GD32)/Drivers/STM32F3xx_HAL_Driver/Src
CFLAGS_GD32 += \
-I$(HAL_FOLDER_GD32)/Inc \
-I$(HAL_FOLDER_GD32)/Drivers/STM32F3xx_HAL_Driver/Inc \
-I$(HAL_FOLDER_GD32)/Drivers/CMSIS/Include \
-I$(HAL_FOLDER_GD32)/Drivers/CMSIS/Device/ST/STM32F3xx/Include
CFLAGS_GD32 += \
-DHSE_VALUE=8000000 \
-DSTM32F302xC \
-DHSE_STARTUP_TIMEOUT=100 \
-DLSE_STARTUP_TIMEOUT=5000 \
-DLSE_VALUE=32768 \
-DVDD_VALUE=3300 \
-DLSI_VALUE=32000 \
-DHSI_VALUE=8000000 \
-DUSE_FULL_LL_DRIVER \
-DPREFETCH_ENABLE=1
SRC_GD32 := $(foreach dir,$(SRC_DIR_GD32),$(wildcard $(dir)/*.[cs]))