-
Notifications
You must be signed in to change notification settings - Fork 114
/
g071makefile.mk
40 lines (31 loc) · 1.01 KB
/
g071makefile.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
34
35
36
37
38
39
40
MCU := G071
PART := STM32G071xx
MCU_LC := $(call lc,$(MCU))
TARGETS_$(MCU) := $(call get_targets,$(MCU))
HAL_FOLDER_$(MCU) := $(HAL_FOLDER)/$(MCU_LC)
MCU_$(MCU) := -mcpu=cortex-m0 -mthumb
LDSCRIPT_$(MCU) := $(wildcard $(HAL_FOLDER_$(MCU))/*.ld)
SRC_BASE_DIR_$(MCU) := \
$(HAL_FOLDER_$(MCU))/Startup \
$(HAL_FOLDER_$(MCU))/Drivers/STM32G0xx_HAL_Driver/Src
SRC_DIR_$(MCU) := $(SRC_BASE_DIR_$(MCU)) \
$(HAL_FOLDER_$(MCU))/Src
CFLAGS_$(MCU) := \
-I$(HAL_FOLDER_$(MCU))/Inc \
-I$(HAL_FOLDER_$(MCU))/Drivers/STM32G0xx_HAL_Driver/Inc \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/Include \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/Device/ST/STM32G0xx/Include
CFLAGS_$(MCU) += \
-DHSE_VALUE=8000000 \
-D$(PART) \
-DHSE_STARTUP_TIMEOUT=100 \
-DLSE_STARTUP_TIMEOUT=5000 \
-DLSE_VALUE=32768 \
-DDATA_CACHE_ENABLE=1 \
-DINSTRUCTION_CACHE_ENABLE=0 \
-DVDD_VALUE=3300 \
-DLSI_VALUE=32000 \
-DHSI_VALUE=16000000 \
-DUSE_FULL_LL_DRIVER \
-DPREFETCH_ENABLE=1
SRC_$(MCU) := $(foreach dir,$(SRC_DIR_$(MCU)),$(wildcard $(dir)/*.[cs]))