2 include(at32-stdperiph)
5 set(AT32F4_STDPERIPH_DIR "${MAIN_LIB_DIR}/main/AT32F43x/Drivers/AT32F43x_StdPeriph_Driver")
6 set(AT32F4_CMSIS_DEVICE_DIR "${MAIN_LIB_DIR}/main/AT32F43x/Drivers/CMSIS/Device/ST/AT32F43x")
7 set(AT32F4_CMSIS_DRIVERS_DIR "${MAIN_LIB_DIR}/main/AT32F43x/Drivers/CMSIS")
10 set(AT32F4_STDPERIPH_SRC_EXCLUDES
17 set(AT32F4_STDPERIPH_SRC_DIR "${AT32F4_STDPERIPH_DIR}/src")
18 glob_except(AT32F4_STDPERIPH_SRC "${AT32F4_STDPERIPH_SRC_DIR}/*.c" "${AT32F4_STDPERIPH_SRC_EXCLUDES}")
20 list(APPEND AT32F4_STDPERIPH_SRC "${AT32F4_CMSIS_DEVICE_DIR}/at32f435_437_clock.c" )
22 main_sources(AT32F4_SRC
23 target/system_at32f435_437.c
24 config/config_streamer_at32f43x.c
25 config/config_streamer_ram.c
26 config/config_streamer_extflash.c
27 drivers/adc_at32f43x.c
28 drivers/i2c_application.c
29 drivers/bus_i2c_at32f43x.c
30 drivers/bus_spi_at32f43x
31 drivers/serial_uart_hal_at32f43x.c
32 drivers/serial_uart_at32f43x.c
34 drivers/system_at32f43x.c
36 drivers/timer_impl_stdperiph_at32.c
37 drivers/timer_at32f43x.c
38 drivers/uart_inverter.c
39 drivers/dma_at32f43x.c
42 set(AT32F4_INCLUDE_DIRS
44 ${CMSIS_DSP_INCLUDE_DIR}
45 ${AT32F4_CMSIS_DRIVERS_DIR}
46 ${AT32F4_STDPERIPH_DIR}/inc
47 ${AT32F4_CMSIS_DEVICE_DIR}
51 set(AT32F4_DEFINITIONS
52 ${CORTEX_M4F_DEFINITIONS}
57 function(target_at32f43x)
59 SOURCES ${AT32_STDPERIPH_SRC} ${AT32F4_SRC}
60 COMPILE_DEFINITIONS ${AT32F4_DEFINITIONS}
61 COMPILE_OPTIONS ${CORTEX_M4F_COMMON_OPTIONS} ${CORTEX_M4F_COMPILE_OPTIONS}
62 INCLUDE_DIRECTORIES ${AT32F4_INCLUDE_DIRS}
63 LINK_OPTIONS ${CORTEX_M4F_COMMON_OPTIONS} ${CORTEX_M4F_LINK_OPTIONS}
65 MSC_SOURCES ${AT32F4_USBMSC_SRC} ${AT32F4_MSC_SRC}
66 VCP_SOURCES ${AT32F4_USB_SRC} ${AT32F4_VCP_SRC}
67 VCP_INCLUDE_DIRECTORIES ${AT32F4_USB_INCLUDE_DIRS}
71 OPENOCD_TARGET at32f437xx
80 set(at32f43x_xMT7_COMPILE_DEFINITIONS
85 function(target_at32f43x_xMT7 name)
88 STARTUP startup_at32f435_437.s
89 SOURCES ${AT32F4_STDPERIPH_SRC}
90 COMPILE_DEFINITIONS ${at32f43x_xMT7_COMPILE_DEFINITIONS}
91 LINKER_SCRIPT at32_flash_f43xM
98 set(at32f43x_xGT7_COMPILE_DEFINITIONS
103 function(target_at32f43x_xGT7 name)
106 STARTUP startup_at32f435_437.s
107 SOURCES ${AT32F4_STDPERIPH_SRC}
108 COMPILE_DEFINITIONS ${at32f43x_xGT7_COMPILE_DEFINITIONS}
109 LINKER_SCRIPT at32_flash_f43xG