1 CMSIS_DIR
:= $(ROOT
)/lib
/main
/AT32F43x
/cmsis
4 DEVICE_FLAGS
= -DAT32F435ZMT7
5 TARGET_MCU_FAMILY
:= AT32F4
7 AT_LIB_DIR
= $(ROOT
)/lib
/main
/AT32F43x
8 STDPERIPH_DIR
= $(AT_LIB_DIR
)/drivers
10 STDPERIPH_SRC
= $(notdir $(wildcard $(STDPERIPH_DIR
)/src
/*.c
))
12 EXCLUDES
= at32f435_437_dvp.c \
17 STARTUP_SRC
= at32
/startup_at32f435_437.s
18 STDPERIPH_SRC
:= $(filter-out ${EXCLUDES}, $(STDPERIPH_SRC
))
20 VPATH
:= $(VPATH
):$(AT_LIB_DIR
)/cmsis
/cm4
/core_support
:$(STDPERIPH_DIR
)/inc
:$(SRC_DIR
)/startup
/at32
:$(STDPERIPH_DIR
)/src
22 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
23 $(SRC_DIR
)/startup
/at32 \
24 $(STDPERIPH_DIR
)/inc \
25 $(AT_LIB_DIR
)/cmsis
/cm4
/core_support \
26 $(AT_LIB_DIR
)/cmsis
/cm4 \
27 $(AT_LIB_DIR
)/middlewares
/i2c_application_library \
28 $(AT_LIB_DIR
)/middlewares
/usb_drivers
/inc \
29 $(AT_LIB_DIR
)/middlewares
/usbd_class
/cdc
31 DEVICE_STDPERIPH_SRC
= $(STDPERIPH_SRC
)
34 $(AT_LIB_DIR
)/middlewares
/i2c_application_library
/i2c_application.c
36 LD_SCRIPT
= $(LINKER_DIR
)/at32_flash_f43xM.
ld
38 ARCH_FLAGS
= -std
=c99
-mthumb
-mcpu
=cortex-m4
-march
=armv7e-m
-mfloat-abi
=hard
-mfpu
=fpv4-sp-d16
-fsingle-precision-constant
-Wdouble-promotion
39 DEVICE_FLAGS
+= -DUSE_ATBSP_DRIVER
-DAT32F43x
-DHSE_VALUE
=$(HSE_VALUE
) -DAT32
-DUSE_OTG_HOST_MODE
42 $(addprefix startup
/at32
/,$(notdir $(wildcard $(SRC_DIR
)/startup
/at32
/*.c
))) \
43 $(addprefix drivers
/at32
/,$(notdir $(wildcard $(SRC_DIR
)/drivers
/at32
/*.c
))) \
44 drivers
/bus_i2c_timing.c
50 $(addprefix $(AT_LIB_DIR
)/middlewares
/usbd_class
/cdc
/,$(notdir $(wildcard $(AT_LIB_DIR
)/middlewares
/usbd_class
/cdc
/*.c
))) \
51 $(addprefix $(AT_LIB_DIR
)/middlewares
/usb_drivers
/src
/,$(notdir $(wildcard $(AT_LIB_DIR
)/middlewares
/usb_drivers
/src
/*.c
))) \