2021-02-18 13:29:12 +08:00
|
|
|
from building import *
|
|
|
|
import rtconfig
|
|
|
|
|
2023-12-27 18:41:52 +08:00
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = Glob('CMSIS/DeviceSupport/*.c')
|
2021-02-18 13:29:12 +08:00
|
|
|
src += Glob('SWM320_StdPeriph_Driver/*.c')
|
|
|
|
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2021-02-18 13:29:12 +08:00
|
|
|
src += ['CMSIS/DeviceSupport/startup/gcc/startup_SWM320.s']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2021-02-18 13:29:12 +08:00
|
|
|
src += ['CMSIS/DeviceSupport/startup/arm/startup_SWM320.s']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2021-02-18 13:29:12 +08:00
|
|
|
src += ['CMSIS/DeviceSupport/startup/iar/startup_SWM320.s']
|
2023-12-27 18:41:52 +08:00
|
|
|
|
|
|
|
inc = [cwd + '/CMSIS/CoreSupport',
|
|
|
|
cwd + '/CMSIS/DeviceSupport',
|
|
|
|
cwd + '/SWM320_StdPeriph_Driver'
|
|
|
|
]
|
|
|
|
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = inc)
|
2021-02-18 13:29:12 +08:00
|
|
|
|
|
|
|
Return('group')
|