2022-08-14 10:29:05 +08:00
|
|
|
from building import *
|
|
|
|
import rtconfig
|
|
|
|
cwd = GetCurrentDir()
|
2023-01-09 10:14:23 +08:00
|
|
|
src = Glob('CMSIS/DeviceSupport/*.c')
|
2022-08-14 10:29:05 +08:00
|
|
|
CPPPATH = [cwd + '/CMSIS/CoreSupport', cwd + '/CMSIS/DeviceSupport', cwd + '/SWM341_StdPeriph_Driver']
|
|
|
|
|
|
|
|
src += Glob('SWM341_StdPeriph_Driver/*.c')
|
|
|
|
|
2022-08-17 00:43:24 +08:00
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
2022-08-14 10:29:05 +08:00
|
|
|
src += ['CMSIS/DeviceSupport/startup/gcc/startup_SWM341.s']
|
2022-08-17 00:43:24 +08:00
|
|
|
elif rtconfig.CROSS_TOOL == 'keil':
|
2022-08-14 10:29:05 +08:00
|
|
|
src += ['CMSIS/DeviceSupport/startup/arm/startup_SWM341.s']
|
2022-08-17 00:43:24 +08:00
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
2022-08-14 10:29:05 +08:00
|
|
|
src += ['CMSIS/DeviceSupport/startup/iar/startup_SWM341.s']
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|