SConscript 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import os
  2. import rtconfig
  3. from building import *
  4. Import('SDK_LIB')
  5. objs = []
  6. cwd = GetCurrentDir()
  7. list = os.listdir(cwd)
  8. # add the general drivers.
  9. src = Glob('board.c')
  10. # add cubemx drivers
  11. src += Split('''
  12. CubeMX_Config/Appli/Core/Src/stm32h7rsxx_hal_msp.c
  13. ''')
  14. if GetDepend(['BSP_USING_FS']):
  15. src += Glob('port/filesystem.c')
  16. path = [cwd]
  17. path += [cwd + '/CubeMX_Config/Appli/Core/Inc']
  18. path += [cwd + '/port']
  19. startup_path_prefix = SDK_LIB
  20. if rtconfig.CROSS_TOOL == 'gcc':
  21. src += [startup_path_prefix + '/STM32H7RSxx_HAL/CMSIS/Device/ST/STM32H7RSxx/Source/Templates/gcc/startup_stm32h7s7xx.s']
  22. elif rtconfig.CROSS_TOOL == 'keil':
  23. src += [startup_path_prefix + '/STM32H7RSxx_HAL/CMSIS/Device/ST/STM32H7RSxx/Source/Templates/arm/startup_stm32h7s7xx.s']
  24. elif rtconfig.CROSS_TOOL == 'iar':
  25. src += [startup_path_prefix + '/STM32H7RSxx_HAL/CMSIS/Device/ST/STM32H7RSxx/Source/Templates/iar/startup_stm32h7s7xx.s']
  26. CPPDEFINES = ['STM32H7S7xx']
  27. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  28. Return('group')