SConscript 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. '''
  2.  : Copyright (c) 2020 Phytium Information Technology, Inc. 
  3.  
  4. SPDX-License-Identifier: Apache-2.0.
  5. Date: 2021-05-24 14:30:13
  6. LastEditTime: 2021-05-26 14:58:34
  7. Description:  This files is for 
  8. Modify History:
  9.  Ver   Who        Date         Changes
  10. ----- ------     --------    --------------------------------------
  11. '''
  12. from building import *
  13. import rtconfig
  14. Import('RTT_ROOT')
  15. # get current directory
  16. cwd = GetCurrentDir()
  17. # The set of source files associated with this SConscript file.
  18. src = Split("""
  19. bsp/standlone/ft_assert.c
  20. bsp/standlone/ft_generic_timer.c
  21. bsp/standlone/ft_printf.c
  22. bsp/standlone/ft_trace.c
  23. bsp/standlone/ft_mux.c
  24. bsp/standlone/inbyte.c
  25. bsp/standlone/outbyte.c
  26. bsp/standlone/ft_cache.c
  27. bsp/standlone/ft_cpu.c
  28. bsp/standlone/ft_smc.S
  29. bsp/standlone/ft_psci.c
  30. bsp/standlone/ft_debug.c
  31. """)
  32. if GetDepend(['RT_USING_SERIAL']):
  33. src += ['bsp/ft_uart/ft_uart_g.c']
  34. src += ['bsp/ft_uart/ft_uart_hw.c']
  35. src += ['bsp/ft_uart/ft_uart_intr.c']
  36. src += ['bsp/ft_uart/ft_uart_options.c']
  37. src += ['bsp/ft_uart/ft_uart_selftest.c']
  38. src += ['bsp/ft_uart/ft_uart_sinit.c']
  39. src += ['bsp/ft_uart/ft_uart.c']
  40. if GetDepend(['RT_USING_I2C']):
  41. None
  42. if GetDepend(['RT_USING_USB_HOST']) or GetDepend(['RT_USING_USB_DEVICE']):
  43. None
  44. if GetDepend(['BSP_USE_CAN']):
  45. src += ['bsp/ft_can/ft_can_g.c']
  46. src += ['bsp/ft_can/ft_can_hw.c']
  47. src += ['bsp/ft_can/ft_can_intr.c']
  48. src += ['bsp/ft_can/ft_can_sinit.c']
  49. src += ['bsp/ft_can/ft_can.c']
  50. src += ['bsp/ft_can/ft_can_calc.c']
  51. None
  52. if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']):
  53. None
  54. if GetDepend(['RT_USING_ADC']):
  55. None
  56. if GetDepend(['RT_USING_RTC']):
  57. None
  58. if GetDepend(['RT_USING_WDT']):
  59. None
  60. if GetDepend(['RT_USING_AUDIO']):
  61. None
  62. if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
  63. None
  64. if GetDepend(['BSP_USING_GMAC']):
  65. src += ['bsp/ft_gmac/ft_gmac_desc.c']
  66. src += ['bsp/ft_gmac/ft_gmac_g.c']
  67. src += ['bsp/ft_gmac/ft_gmac_hw.c']
  68. src += ['bsp/ft_gmac/ft_gmac_intr.c']
  69. src += ['bsp/ft_gmac/ft_gmac_sinit.c']
  70. src += ['bsp/ft_gmac/ft_gmac.c']
  71. if GetDepend(['BSP_USING_SDC']):
  72. src += ['bsp/ft_sd/ft_sdctrl_option.c']
  73. src += ['bsp/ft_sd/ft_sdctrl_sinit.c']
  74. src += ['bsp/ft_sd/ft_sdctrl_intr.c']
  75. src += ['bsp/ft_sd/ft_sdctrl_g.c']
  76. src += ['bsp/ft_sd/ft_sdctrl_hw.c']
  77. src += ['bsp/ft_sd/ft_sdctrl.c']
  78. if GetDepend(['BSP_USE_QSPI']):
  79. src += ['bsp/ft_qspi/qspi_g.c']
  80. src += ['bsp/ft_qspi/qspi_hw.c']
  81. src += ['bsp/ft_qspi/ft_qspi.c']
  82. src += ['bsp/ft_qspi/qspi_sinit.c']
  83. if GetDepend(['BSP_USE_SPI']):
  84. src += ['bsp/ft_spi/ft_spi.c']
  85. src += ['bsp/ft_spi/ft_spi_irq.c']
  86. if GetDepend(['BSP_USE_GPIO']):
  87. src += ['bsp/ft_gpio/ft_gpio.c']
  88. path = [cwd + '/bsp/standlone/',
  89. cwd + '/bsp/ft_gicv3',
  90. cwd + '/bsp/ft_gmac',
  91. cwd + '/bsp/ft_uart',
  92. cwd + '/bsp/ft_sd',
  93. cwd + '/bsp/ft_qspi',
  94. cwd + '/bsp/ft_can',
  95. cwd + '/bsp/ft_spi',
  96. cwd + '/bsp/ft_gpio',
  97. cwd + '/bsp/include',
  98. cwd + '/include',
  99. cwd + '/cpu', ]
  100. CPPDEFINES = ['USE_FT_DRIVER']
  101. group = DefineGroup('FT_DRIVER', src, depend=[
  102. ''], CPPPATH=path, CPPDEFINES=CPPDEFINES)
  103. Return('group')