2022-04-04 11:07:49 +08:00
|
|
|
import rtconfig
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = Split("""
|
|
|
|
StdPeriph_Driver/src/ch32v10x_adc.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_bkp.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_crc.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_dbgmcu.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_dma.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_exti.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_flash.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_gpio.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_i2c.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_iwdg.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_misc.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_pwr.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_rcc.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_rtc.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_spi.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_tim.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_usart.c
|
|
|
|
StdPeriph_Driver/src/ch32v10x_wwdg.c
|
|
|
|
CMSIS/core_riscv.c
|
|
|
|
CMSIS/WCH/CH32V10x/Source/system_ch32v10x.c
|
|
|
|
CMSIS/WCH/CH32V10x/Source/GCC/startup_ch32v10x.S
|
|
|
|
""")
|
|
|
|
|
|
|
|
path = [
|
2023-01-09 10:14:23 +08:00
|
|
|
cwd + '/CMSIS',
|
2022-04-04 11:07:49 +08:00
|
|
|
cwd + '/CMSIS/WCH/CH32V10x/Include',
|
|
|
|
cwd + '/StdPeriph_Driver/inc']
|
|
|
|
|
|
|
|
|
|
|
|
group = DefineGroup('ch32v10x_lib', src, depend = [''], CPPPATH = path)
|
|
|
|
|
|
|
|
Return('group')
|