4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-15 21:46:18 +08:00
2015-04-06 13:46:14 +08:00

28 lines
805 B
Python

import rtconfig
Import('RTT_ROOT')
from building import *
# get current directory
cwd = GetCurrentDir()
# The set of source files associated with this SConscript file.
src = Split("""
nrf51822/Source/templates/system_nrf51.c
""")
#add for Startup script
if rtconfig.CROSS_TOOL == 'gcc':
src = src + ['nrf51822/Source/templates/arm/arm_startup_nrf51.s']
elif rtconfig.CROSS_TOOL == 'keil':
src = src + ['nrf51822/Source/templates/arm/arm_startup_nrf51.s']
elif rtconfig.CROSS_TOOL == 'iar':
src = src + ['nrf51822/Source/templates/arm/arm_startup_nrf51.s']
path = [cwd + '/CMSIS/Include',
cwd + '/nrf51822/Include']
CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'NRF51']
group = DefineGroup('Startup Code', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')