forked from am32-firmware/AM32
-
Notifications
You must be signed in to change notification settings - Fork 0
/
g431makefile.mk
33 lines (24 loc) · 837 Bytes
/
g431makefile.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
MCU := G431
PART := STM32G431xx
MCU_LC := $(call lc,$(MCU))
TARGETS_$(MCU) := $(call get_targets,$(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/gcc \
$(HAL_FOLDER_$(MCU))/Drivers/STM32G4xx_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/STM32G4xx_HAL_Driver/Inc \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/Include \
-I$(HAL_FOLDER_$(MCU))/Drivers/CMSIS/Device/ST/STM32G4xx/Include
CFLAGS_$(MCU) += \
-DHSE_VALUE=8000000 \
-D$(PART) \
-DUSE_FULL_LL_DRIVER \
-DPREFETCH_ENABLE=1
SRC_$(MCU) := $(foreach dir,$(SRC_DIR_$(MCU)),$(wildcard $(dir)/*.[cs]))