SConscript 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. CubeMX_Config/Src/stm32l4xx_hal_msp.c
  10. ''')
  11. if GetDepend(['BSP_USING_DSI']):
  12. src += Glob('ports/drv_lcd_dsi.c')
  13. if GetDepend(['BSP_USING_SRAM']):
  14. src += Glob('ports/drv_sram.c')
  15. if GetDepend(['BSP_USING_TOUCH']):
  16. src += Glob('ports/drv_touch.c')
  17. src += Glob('ports/drv_touch_ft.c')
  18. path = [cwd]
  19. path += [cwd + '/CubeMX_Config/Inc']
  20. path += [cwd + '/ports/include']
  21. startup_path_prefix = SDK_LIB
  22. if rtconfig.PLATFORM in ['gcc']:
  23. src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l4r9xx.s']
  24. elif rtconfig.PLATFORM in ['armcc', 'armclang']:
  25. src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l4r9xx.s']
  26. elif rtconfig.PLATFORM in ['iccarm']:
  27. src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l4r9xx.s']
  28. # STM32L412xx || STM32L422xx || STM32L431xx
  29. # STM32L432xx || STM32L433xx || STM32L442xx
  30. # STM32L443xx || STM32L451xx || STM32L452xx
  31. # STM32L462xx || STM32L471xx || STM32L475xx
  32. # STM32L476xx || STM32L485xx || STM32L486xx
  33. # STM32L496xx || STM32L4A6xx || STM32L4R5xx
  34. # STM32L4R7xx || STM32L4R9xx || STM32L4S5xx
  35. # STM32L4S7xx || STM32L4S9xx
  36. # You can select chips from the list above
  37. CPPDEFINES = ['STM32L4R9xx']
  38. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  39. Return('group')