2021-08-31 14:41:35 +08:00
|
|
|
import rtconfig
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = Split("""
|
|
|
|
StdPeriph_Driver/src/ch32f10x_adc.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_bkp.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_can.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_crc.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_dac.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_dbgmcu.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_dma.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_exti.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_flash.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_gpio.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_i2c.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_iwdg.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_misc.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_pwr.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_rcc.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_rtc.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_spi.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_tim.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_usart.c
|
|
|
|
StdPeriph_Driver/src/ch32f10x_wwdg.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
path = [
|
2023-01-09 10:14:23 +08:00
|
|
|
cwd + '/CMSIS',
|
2021-08-31 14:41:35 +08:00
|
|
|
cwd + '/CMSIS/WCH/CH32F10x/Include',
|
|
|
|
cwd + '/StdPeriph_Driver/inc']
|
|
|
|
|
|
|
|
|
|
|
|
group = DefineGroup('ch32f10x_lib', src, depend = [''], CPPPATH = path)
|
|
|
|
|
|
|
|
Return('group')
|