SConscript 982 B

12345678910111213141516171819202122232425262728293031323334
  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_ON_CHIP_FLASH']):
  12. src += Glob('mnt.c')
  13. path = [cwd]
  14. path += [cwd + '/CubeMX_Config/Inc']
  15. path += [cwd + '/ports']
  16. startup_path_prefix = SDK_LIB
  17. if rtconfig.PLATFORM in ['gcc']:
  18. src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l496xx.s']
  19. elif rtconfig.PLATFORM in ['armcc', 'armclang']:
  20. src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l496xx.s']
  21. elif rtconfig.PLATFORM in ['iccarm']:
  22. src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l496xx.s']
  23. CPPDEFINES = ['STM32L496xx']
  24. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  25. Return('group')