SConscript 805 字节
Newer Older
X
Xue Liu 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
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("""
nrf52832/Source/templates/system_nrf52.c
""")

#add for Startup script 
if rtconfig.CROSS_TOOL == 'gcc':
     src = src + ['nrf52832/Source/templates/arm/gcc_startup_nrf52.s']
elif rtconfig.CROSS_TOOL == 'keil':
     src = src + ['nrf52832/Source/templates/arm/arm_startup_nrf52.s']
elif rtconfig.CROSS_TOOL == 'iar':
     src = src + ['nrf52832/Source/templates/arm/iar_startup_nrf52.s']

path = [cwd + '/CMSIS/Include',
        cwd + '/nrf52832/Include']

CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'NRF52']
group = DefineGroup('Startup Code', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)

Return('group')