-
Notifications
You must be signed in to change notification settings - Fork 97
/
l431makefile.mk
39 lines (31 loc) · 1018 Bytes
/
l431makefile.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
MCU := L431
PART := STM32L431xx
TARGETS_$(MCU) := $(call get_targets,$(MCU))
HAL_FOLDER_$(MCU) := $(HAL_FOLDER)/$(call lc,$(MCU))
MCU_$(MCU) := -mcpu=cortex-m4 -mthumb
LDSCRIPT_$(MCU) := $(wildcard $(HAL_FOLDER_$(MCU))/*.ld)
SRC_BASE_DIR_$(MCU) := \
$(HAL_FOLDER_$(MCU))/Startup/gcc \
$(HAL_FOLDER_$(MCU))/Drivers/STM32L4xx_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/STM32L4xx_HAL_Driver/Inc \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/Include \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/Device/ST/STM32L4xx/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]))