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. nrf52832/Source/templates/system_nrf52.c
  9. """)
  10. #add for Startup script
  11. if rtconfig.CROSS_TOOL == 'gcc':
  12. src = src + ['nrf52832/Source/templates/arm/gcc_startup_nrf52.s']
  13. elif rtconfig.CROSS_TOOL == 'keil':
  14. src = src + ['nrf52832/Source/templates/arm/arm_startup_nrf52.s']
  15. elif rtconfig.CROSS_TOOL == 'iar':
  16. src = src + ['nrf52832/Source/templates/arm/iar_startup_nrf52.s']
  17. path = [cwd + '/CMSIS/Include',
  18. cwd + '/nrf52832/Include']
  19. CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'NRF52']
  20. group = DefineGroup('Startup Code', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  21. Return('group')