2021-08-31 14:41:35 +08:00
|
|
|
import os
|
|
|
|
import rtconfig
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
Import('SDK_LIB')
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# add general drivers
|
|
|
|
src = Split('''
|
|
|
|
system_ch32f10x.c
|
|
|
|
board.c
|
|
|
|
''')
|
|
|
|
|
|
|
|
|
|
|
|
startup_path_prefix = SDK_LIB
|
|
|
|
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2021-08-31 14:41:35 +08:00
|
|
|
src += [startup_path_prefix + '/CH32F10x_StdPeriph_Driver/CMSIS/WCH/CH32F10x/Source/ARM/startup_ch32f10x.s']
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
2021-09-03 15:44:19 +08:00
|
|
|
src += [startup_path_prefix + '/CH32F10x_StdPeriph_Driver/CMSIS/WCH/CH32F10x/Source/GCC/startup_ch32f10x.S']
|
2021-08-31 14:41:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
path = [cwd]
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
|
|
|
|
Return('group')
|