4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 08:23:31 +08:00
Man, Jianting (Meco) a0f8d43744
[gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM (#5802)
* [gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM
2022-04-20 09:56:04 +08:00

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 == 'gcc':
src += ['CMSIS/WCH/CH32F20x/Source/GCC/startup_ch32f20x.S']
group = DefineGroup('ch32f20x_lib', src, depend = [''], CPPPATH = path)
Return('group')