SConscript 805 B

123456789101112131415161718192021222324252627
  1. import rtconfig
  2. Import('RTT_ROOT')
  3. from building import *
  4. # get current directory
  5. cwd = GetCurrentDir()
  6. # The set of source files associated with this SConscript file.
  7. src = Split("""
  8. nrf51822/Source/templates/system_nrf51.c
  9. """)
  10. #add for Startup script
  11. if rtconfig.CROSS_TOOL == 'gcc':
  12. src = src + ['nrf51822/Source/templates/arm/arm_startup_nrf51.s']
  13. elif rtconfig.CROSS_TOOL == 'keil':
  14. src = src + ['nrf51822/Source/templates/arm/arm_startup_nrf51.s']
  15. elif rtconfig.CROSS_TOOL == 'iar':
  16. src = src + ['nrf51822/Source/templates/arm/arm_startup_nrf51.s']
  17. path = [cwd + '/CMSIS/Include',
  18. cwd + '/nrf51822/Include']
  19. CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'NRF51']
  20. group = DefineGroup('Startup Code', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  21. Return('group')