1
0

SConscript 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import os
  2. import rtconfig
  3. from building import *
  4. Import('SDK_LIB')
  5. cwd = GetCurrentDir()
  6. # add general drivers
  7. src = Split('''
  8. board.c
  9. drv_mpu.c
  10. CubeMX_Config/Src/stm32h7xx_hal_msp.c
  11. ''')
  12. if GetDepend(['BSP_USING_QSPI_FLASH']):
  13. src += Glob('ports/drv_qspi_flash.c')
  14. if GetDepend(['BSP_USING_SDMMC']):
  15. src += Glob('ports/drv_sdio.c')
  16. if GetDepend(['BSP_USING_DCMI']):
  17. src += Glob('ports/drv_dcmi.c')
  18. if GetDepend(['BSP_USING_OV2640']):
  19. src += Glob('ports/drv_ov2640.c')
  20. path = [cwd]
  21. path += [cwd + '/CubeMX_Config/Inc']
  22. path += [cwd + '/ports']
  23. startup_path_prefix = SDK_LIB
  24. if rtconfig.PLATFORM in ['gcc']:
  25. src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s']
  26. elif rtconfig.PLATFORM in ['armcc', 'armclang']:
  27. src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h743xx.s']
  28. elif rtconfig.PLATFORM in ['iccarm']:
  29. src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h743xx.s']
  30. # STM32H743xx || STM32H750xx || STM32F753xx
  31. # You can select chips from the list above
  32. CPPDEFINES = ['STM32H743xx']
  33. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  34. Return('group')