2021-09-10 19:41:22 +08:00
|
|
|
from building import *
|
|
|
|
import rtconfig
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Glob('sdk/*.c')
|
|
|
|
CPPPATH = [cwd + '/sdk', cwd + '/core', cwd]
|
|
|
|
|
|
|
|
src += Glob('core/*.c')
|
|
|
|
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2021-09-10 19:41:22 +08:00
|
|
|
src += ['startup/flash_start_gcc.s']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2021-09-10 19:41:22 +08:00
|
|
|
src += ['startup/startup.s', 'startup/flash_start.s']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2021-09-10 19:41:22 +08:00
|
|
|
src += ['startup/flash_start_iar.s']
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|