1
0

SConscript 972 B

1234567891011121314151617181920212223242526272829303132
  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/stm32f1xx_hal_msp.c
  10. ''')
  11. if GetDepend(['BSP_USING_SPI_FLASH']):
  12. src += Glob('ports/spi_flash_init.c')
  13. path = [cwd]
  14. path += [cwd + '/CubeMX_Config/Inc']
  15. startup_path_prefix = SDK_LIB
  16. if rtconfig.PLATFORM in ['gcc']:
  17. src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xe.s']
  18. elif rtconfig.PLATFORM in ['armcc', 'armclang']:
  19. src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/startup_stm32f103xe.s']
  20. elif rtconfig.PLATFORM in ['iccarm']:
  21. src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
  22. CPPDEFINES = ['STM32F103xE']
  23. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  24. Return('group')