SConscript 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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, 'stm32h7rsxx_hal.c'),
  9. os.path.join(src_path, 'stm32h7rsxx_hal_cec.c'),
  10. os.path.join(src_path, 'stm32h7rsxx_hal_cortex.c'),
  11. os.path.join(src_path, 'stm32h7rsxx_hal_crc.c'),
  12. os.path.join(src_path, 'stm32h7rsxx_hal_crc_ex.c'),
  13. os.path.join(src_path, 'stm32h7rsxx_hal_cryp.c'),
  14. os.path.join(src_path, 'stm32h7rsxx_hal_cryp_ex.c'),
  15. os.path.join(src_path, 'stm32h7rsxx_hal_dma.c'),
  16. os.path.join(src_path, 'stm32h7rsxx_hal_dma_ex.c'),
  17. os.path.join(src_path, 'stm32h7rsxx_hal_pwr.c'),
  18. os.path.join(src_path, 'stm32h7rsxx_hal_pwr_ex.c'),
  19. os.path.join(src_path, 'stm32h7rsxx_hal_rcc.c'),
  20. os.path.join(src_path, 'stm32h7rsxx_hal_rcc_ex.c'),
  21. os.path.join(src_path, 'stm32h7rsxx_hal_rng.c'),
  22. os.path.join(src_path, 'stm32h7rsxx_hal_sram.c'),
  23. os.path.join(src_path, 'stm32h7rsxx_hal_gpio.c'),
  24. os.path.join(src_path, 'stm32h7rsxx_hal_adc.c'),
  25. os.path.join(src_path, 'stm32h7rsxx_hal_adc_ex.c'),
  26. os.path.join(src_path, 'stm32h7rsxx_hal_xspi.c'),
  27. os.path.join(src_path, 'stm32h7rsxx_hal_flash.c'),
  28. os.path.join(src_path, 'stm32h7rsxx_hal_flash_ex.c'),
  29. ]
  30. if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']):
  31. src += [os.path.join(src_path, 'stm32h7rsxx_hal_uart.c')]
  32. src += [os.path.join(src_path, 'stm32h7rsxx_hal_usart.c')]
  33. src += [os.path.join(src_path, 'stm32h7rsxx_hal_uart_ex.c')]
  34. group = DefineGroup('STM32H7RS-HAL', src, depend = ['PKG_USING_STM32H7RS_HAL_DRIVER'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  35. Return('group')