SConscript 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. from building import *
  2. import os
  3. cwd = GetCurrentDir()
  4. path = [os.path.join(cwd, 'Inc')]
  5. src_path = os.path.join(cwd, 'Src')
  6. CPPDEFINES = ['USE_HAL_DRIVER']
  7. src = [
  8. os.path.join(src_path, 'stm32mp1xx_hal.c'),
  9. os.path.join(src_path, 'stm32mp1xx_hal_hsem.c'),
  10. os.path.join(src_path, 'stm32mp1xx_hal_exti.c'),
  11. os.path.join(src_path, 'stm32mp1xx_hal_ipcc.c'),
  12. os.path.join(src_path, 'stm32mp1xx_hal_cortex.c'),
  13. os.path.join(src_path, 'stm32mp1xx_hal_dma.c'),
  14. os.path.join(src_path, 'stm32mp1xx_hal_dma_ex.c'),
  15. os.path.join(src_path, 'stm32mp1xx_hal_mdma.c'),
  16. os.path.join(src_path, 'stm32mp1xx_hal_pwr.c'),
  17. os.path.join(src_path, 'stm32mp1xx_hal_pwr_ex.c'),
  18. os.path.join(src_path, 'stm32mp1xx_hal_rcc.c'),
  19. os.path.join(src_path, 'stm32mp1xx_hal_rcc_ex.c'),
  20. os.path.join(src_path, 'stm32mp1xx_hal_gpio.c'),
  21. os.path.join(src_path, 'stm32mp1xx_hal_adc.c'),
  22. os.path.join(src_path, 'stm32mp1xx_hal_adc_ex.c'),
  23. os.path.join(src_path, 'stm32mp1xx_hal_dac.c'),
  24. os.path.join(src_path, 'stm32mp1xx_hal_dac_ex.c'),
  25. os.path.join(src_path, 'stm32mp1xx_hal_i2c.c'),
  26. os.path.join(src_path, 'stm32mp1xx_hal_i2c_ex.c'),
  27. os.path.join(src_path, 'stm32mp1xx_hal_spi.c'),
  28. os.path.join(src_path, 'stm32mp1xx_hal_tim.c'),
  29. os.path.join(src_path, 'stm32mp1xx_hal_tim_ex.c'),
  30. ]
  31. if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']):
  32. src += [os.path.join(src_path, 'stm32mp1xx_hal_uart.c')]
  33. src += [os.path.join(src_path, 'stm32mp1xx_hal_uart_ex.c')]
  34. if GetDepend(['RT_USING_USB']):
  35. src += [os.path.join(src_path, 'stm32mp1xx_hal_pccard.c')]
  36. src += [os.path.join(src_path, 'stm32mp1xx_hal_pcd.c')]
  37. src += [os.path.join(src_path, 'stm32mp1xx_hal_pcd_ex.c')]
  38. src += [os.path.join(src_path, 'stm32mp1xx_hal_hcd.c')]
  39. src += [os.path.join(src_path, 'stm32mp1xx_ll_usb.c')]
  40. if GetDepend(['RT_USING_CAN']):
  41. src += [os.path.join(src_path, 'stm32mp1xx_hal_can.c')]
  42. if GetDepend(['BSP_USING_WWDG']):
  43. src += [os.path.join(src_path, 'stm32mp1xx_hal_wwdg.c')]
  44. if GetDepend(['BSP_USING_LPTIM']):
  45. src += [os.path.join(src_path, 'stm32mp1xx_hal_lptim.c')]
  46. if GetDepend(['RT_USING_RTC']):
  47. src += [os.path.join(src_path, 'stm32mp1xx_hal_rtc.c')]
  48. src += [os.path.join(src_path, 'stm32mp1xx_hal_rtc_ex.c')]
  49. if GetDepend(['RT_USING_WDT']):
  50. src += [os.path.join(src_path, 'stm32mp1xx_hal_wwdg.c')]
  51. if GetDepend(['RT_USING_SDIO']):
  52. src += [os.path.join(src_path, 'stm32mp1xx_ll_sdmmc.c')]
  53. src += [os.path.join(src_path, 'stm32mp1xx_hal_sd.c')]
  54. src += [os.path.join(src_path, 'stm32mp1xx_ll_delayblock.c')]
  55. if GetDepend(['RT_USING_AUDIO']):
  56. src += [os.path.join(src_path, 'stm32mp1xx_hal_sai.c')]
  57. src += [os.path.join(src_path, 'stm32mp1xx_hal_sai_ex.c')]
  58. if GetDepend(['BSP_USING_DCMI']):
  59. src += [os.path.join(src_path, 'stm32mp1xx_hal_dcmi.c')]
  60. if GetDepend(['BSP_USING_FMC']):
  61. src += [os.path.join(src_path, 'stm32mp1xx_ll_fmc.c')]
  62. src += [os.path.join(src_path, 'stm32mp1xx_ll_fsmc.c')]
  63. if GetDepend(['BSP_USING_SDRAM']):
  64. src += [os.path.join(src_path, 'stm32mp1xx_hal_sdram.c')]
  65. if GetDepend(['BSP_USING_EXT_FMC_IO']):
  66. src += [os.path.join(src_path, 'stm32mp1xx_hal_sram.c')]
  67. if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
  68. src += [os.path.join(src_path, 'stm32mp1xx_hal_flash.c')]
  69. src += [os.path.join(src_path, 'stm32mp1xx_hal_flash_ex.c')]
  70. src += [os.path.join(src_path, 'stm32mp1xx_hal_flash_ramfunc.c')]
  71. if GetDepend(['BSP_USING_LTDC']):
  72. src += [os.path.join(src_path, 'stm32mp1xx_hal_ltdc.c')]
  73. src += [os.path.join(src_path, 'stm32mp1xx_hal_ltdc_ex.c')]
  74. src += [os.path.join(src_path, 'stm32mp1xx_hal_dma2d.c')]
  75. src += [os.path.join(src_path, 'stm32mp1xx_ll_dma2d.c')]
  76. src += [os.path.join(src_path, 'stm32mp1xx_hal_dsi.c')]
  77. if GetDepend(['BSP_USING_FDCAN']):
  78. src += [os.path.join(src_path, 'stm32mp1xx_hal_fdcan.c')]
  79. if GetDepend(['BSP_USING_QSPI']):
  80. src += [os.path.join(src_path, 'stm32mp1xx_hal_qspi.c')]
  81. if GetDepend(['BSP_USING_SPDIFRX']):
  82. src += [os.path.join(src_path, 'stm32mp1xx_hal_spdifrx.c')]
  83. if GetDepend(['BSP_USING_DFSDM']):
  84. src += [os.path.join(src_path, 'stm32mp1xx_hal_dfsdm.c')]
  85. src += [os.path.join(src_path, 'stm32mp1xx_hal_dfsdm_ex.c')]
  86. if GetDepend(['BSP_USING_HASH']):
  87. src += [os.path.join(src_path, 'stm32mp1xx_hal_hash.c')]
  88. src += [os.path.join(src_path, 'stm32mp1xx_hal_hash_ex.c')]
  89. if GetDepend(['BSP_USING_CRC']):
  90. src += [os.path.join(src_path, 'stm32mp1xx_hal_crc.c')]
  91. src += [os.path.join(src_path, 'stm32mp1xx_hal_crc_ex.c')]
  92. if GetDepend(['BSP_USING_RNG']):
  93. src += [os.path.join(src_path, 'stm32mp1xx_hal_rng.c')]
  94. if GetDepend(['BSP_USING_CRYP']):
  95. src += [os.path.join(src_path, 'stm32mp1xx_hal_cryp.c')]
  96. src += [os.path.join(src_path, 'stm32mp1xx_hal_cryp_ex.c')]
  97. if GetDepend(['BSP_USING_RTC']):
  98. src += [os.path.join(src_path, 'stm32mp1xx_hal_rtc.c')]
  99. src += [os.path.join(src_path, 'stm32mp1xx_hal_rtc_ex.c')]
  100. group = DefineGroup('STM32MP-HAL', src, depend = ['PKG_USING_STM32MP1_M4_HAL_DRIVER'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  101. Return('group')