SConscript 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. CMSIS/device/system_n32wb452.c
  9. n32wb452_std_periph_driver/src/n32wb452_gpio.c
  10. n32wb452_std_periph_driver/src/n32wb452_rcc.c
  11. n32wb452_std_periph_driver/src/n32wb452_exti.c
  12. n32wb452_std_periph_driver/src/misc.c
  13. ''')
  14. if GetDepend(['RT_USING_SERIAL']):
  15. src += ['n32wb452_std_periph_driver/src/n32wb452_usart.c']
  16. if GetDepend(['RT_USING_I2C']):
  17. src += ['n32wb452_std_periph_driver/src/n32wb452_i2c.c']
  18. if GetDepend(['RT_USING_SPI']):
  19. src += ['n32wb452_std_periph_driver/src/n32wb452_spi.c']
  20. if GetDepend(['RT_USING_CAN']):
  21. src += ['n32wb452_std_periph_driver/src/n32wb452_can.c']
  22. if GetDepend(['RT_USING_ADC']):
  23. src += ['n32wb452_std_periph_driver/src/n32wb452_adc.c']
  24. if GetDepend(['RT_USING_DAC']):
  25. src += ['n32wb452_std_periph_driver/src/n32wb452_dac.c']
  26. if GetDepend(['RT_USING_HWTIMER']):
  27. src += ['n32wb452_std_periph_driver/src/n32wb452_tim.c']
  28. if GetDepend(['RT_USING_RTC']):
  29. src += ['n32wb452_std_periph_driver/src/n32wb452_rtc.c']
  30. src += ['n32wb452_std_periph_driver/src/n32wb452_pwr.c']
  31. src += ['n32wb452_std_periph_driver/src/n32wb452_bkp.c']
  32. if GetDepend(['RT_USING_WDT']):
  33. src += ['n32wb452_std_periph_driver/src/n32wb452_wwdg.c']
  34. src += ['n32wb452_std_periph_driver/src/n32wb452_iwdg.c']
  35. if GetDepend(['RT_USING_SDIO']):
  36. src += ['n32wb452_std_periph_driver/src/n32wb452_sdio.c']
  37. if GetDepend(['RT_USING_BSP_USB']):
  38. path += [cwd + '/n32wb452_usbfs_driver/inc']
  39. src += [cwd + '/n32wb452_usbfs_driver/src']
  40. path = [
  41. cwd + '/CMSIS/device',
  42. cwd + '/CMSIS/core',
  43. cwd + '/n32wb452_std_periph_driver/inc',]
  44. CPPDEFINES = ['USE_STDPERIPH_DRIVER']
  45. group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  46. Return('group')