rt-thread-official/bsp/wch/arm/Libraries/CH32F20x_StdPeriph_Driver/SConscript

47 lines
1.2 KiB
Python

import rtconfig
Import('RTT_ROOT')
from building import *
# get current directory
cwd = GetCurrentDir()
src = Split("""
StdPeriph_Driver/src/ch32f20x_adc.c
StdPeriph_Driver/src/ch32f20x_bkp.c
StdPeriph_Driver/src/ch32f20x_can.c
StdPeriph_Driver/src/ch32f20x_crc.c
StdPeriph_Driver/src/ch32f20x_dac.c
StdPeriph_Driver/src/ch32f20x_dbgmcu.c
StdPeriph_Driver/src/ch32f20x_dma.c
StdPeriph_Driver/src/ch32f20x_exti.c
StdPeriph_Driver/src/ch32f20x_flash.c
StdPeriph_Driver/src/ch32f20x_gpio.c
StdPeriph_Driver/src/ch32f20x_i2c.c
StdPeriph_Driver/src/ch32f20x_iwdg.c
StdPeriph_Driver/src/ch32f20x_misc.c
StdPeriph_Driver/src/ch32f20x_pwr.c
StdPeriph_Driver/src/ch32f20x_rcc.c
StdPeriph_Driver/src/ch32f20x_rtc.c
StdPeriph_Driver/src/ch32f20x_spi.c
StdPeriph_Driver/src/ch32f20x_tim.c
StdPeriph_Driver/src/ch32f20x_usart.c
StdPeriph_Driver/src/ch32f20x_wwdg.c
""")
path = [
cwd + '/CMSIS',
cwd + '/CMSIS/WCH/CH32F20x/Include',
cwd + '/StdPeriph_Driver/inc']
if rtconfig.PLATFORM in ['armcc', 'armclang']:
src += ['CMSIS/WCH/CH32F20x/Source/ARM/startup_ch32f20x.s']
if rtconfig.PLATFORM in ['gcc']:
src += ['CMSIS/WCH/CH32F20x/Source/GCC/startup_ch32f20x.S']
group = DefineGroup('ch32f20x_lib', src, depend = [''], CPPPATH = path)
Return('group')