SConscript 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import os
  2. from building import *
  3. cwd = GetCurrentDir()
  4. # add general drivers
  5. src = Split('''
  6. board.c
  7. CubeMX_Config/CM4/Src/stm32mp1xx_hal_msp.c
  8. ''')
  9. path = [cwd]
  10. path += [cwd + '/CubeMX_Config/CM4/Inc']
  11. if GetDepend(['BSP_USING_OPENAMP']):
  12. src += Glob('CubeMX_Config/CM4/Src/ipcc.c')
  13. src += Glob('CubeMX_Config/CM4/Src/openamp.c')
  14. src += Glob('CubeMX_Config/CM4/Src/openamp_log.c')
  15. src += Glob('CubeMX_Config/CM4/Src/mbox_ipcc.c')
  16. src += Glob('CubeMX_Config/CM4/Src/rsc_table.c')
  17. src += Glob('ports/OpenAMP/libmetal/lib/*.c')
  18. src += Glob('ports/OpenAMP/libmetal/lib/system/generic/*.c')
  19. src += Glob('ports/OpenAMP/libmetal/lib/system/generic/cortexm/*.c')
  20. src += Glob('ports/OpenAMP/open-amp/lib/rpmsg/*.c')
  21. src += Glob('ports/OpenAMP/open-amp/lib/remoteproc/*.c')
  22. src += Glob('ports/OpenAMP/open-amp/lib/virtio/*.c')
  23. src += Glob('ports/OpenAMP/virtual_driver/*.c')
  24. src += Glob('ports/OpenAMP/drv_openamp.c')
  25. if GetDepend(['BSP_USING_OPENAMP']):
  26. path += [cwd + '/ports/OpenAMP']
  27. path += [cwd + '/ports/OpenAMP/open-amp/lib/include']
  28. path += [cwd + '/ports/OpenAMP/libmetal/lib/include']
  29. path += [cwd + '/ports/OpenAMP/virtual_driver']
  30. path += [cwd + '/CubeMX_Config/CM4/Inc']
  31. CPPDEFINES = ['CORE_CM4','NO_ATOMIC_64_SUPPORT','METAL_INTERNAL','METAL_MAX_DEVICE_REGIONS=2','VIRTIO_SLAVE_ONLY','STM32MP157Axx','__LOG_TRACE_IO_']
  32. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  33. # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
  34. # group = group + SConscript(os.path.join("ports", 'SConscript'))
  35. list = os.listdir(cwd)
  36. for item in list:
  37. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  38. group = group + SConscript(os.path.join(item, 'SConscript'))
  39. Return('group')