2017-07-28 21:34:18 +08:00
|
|
|
# RT-Thread building script for component
|
|
|
|
|
|
|
|
Import('rtconfig')
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = Glob('peri_driver/*/*.c')
|
|
|
|
src += Glob('common/board/*.c')
|
|
|
|
src += Glob('common/chip/*.c')
|
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
# add for startup script
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2017-10-26 10:51:21 +08:00
|
|
|
print("not gcc startup file")
|
2017-07-28 21:34:18 +08:00
|
|
|
exit(0)
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2017-07-28 21:34:18 +08:00
|
|
|
src += [cwd + '/common/startup/keil_startup_lpc82x.s']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2017-07-28 21:34:18 +08:00
|
|
|
src += [cwd + '/common/startup/iar_startup_lpc82x.s']
|
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
CPPPATH = [ cwd + '/peri_driver', cwd + '/common/board',
|
|
|
|
cwd + '/common/chip', cwd + '/common/CMSIS']
|
|
|
|
|
2017-07-28 21:34:18 +08:00
|
|
|
CPPDEFINES = ['CORE_M0PLUS']
|
|
|
|
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|