SConscript 753 B

1234567891011121314151617181920212223242526272829
  1. import rtconfig
  2. from building import *
  3. cwd = GetCurrentDir()
  4. src = Split("""
  5. ../../src/tusb.c
  6. ../../src/common/tusb_fifo.c
  7. ../../src/device/usbd.c
  8. ../../src/device/usbd_control.c
  9. ./tinyusb_port.c
  10. ./usb_descriptor.c
  11. """)
  12. path = [cwd, cwd + "/../../src"]
  13. # BSP
  14. if GetDepend(["SOC_FAMILY_STM32"]):
  15. src += ["../../src/portable/st/synopsys/dcd_synopsys.c",
  16. "../../src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c"]
  17. # Device class
  18. if GetDepend(["PKG_TINYUSB_DEVICE_CDC"]):
  19. src += ["../../src/class/cdc/cdc_device.c"]
  20. if GetDepend(["PKG_TINYUSB_DEVICE_MSC"]):
  21. src += ["../../src/class/msc/msc_device.c", "port/msc_device.c"]
  22. group = DefineGroup('tinyusb', src, depend = ['PKG_USING_TINYUSB'], CPPPATH = path)
  23. Return('group')