1
0

SConscript 3.2 KB

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