diff options
| author | HiFiPhile <[email protected]> | 2024-04-28 19:44:10 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-04-28 19:46:00 +0200 |
| commit | a29852320a519c34878797a3e0d6a6a8f2e44d6e (patch) | |
| tree | fbc4d64c3a3b296dd49e65e7df3892299a37c49c /lib/rt-thread/SConscript | |
| parent | f1d3663d24f04dbb68732f8287c516abd0b7ecfb (diff) | |
| parent | 1c04d5992a020aefe16ffb2acce62d84d4899395 (diff) | |
Merge remote-tracking branch 'upstream/master' into pr/2227
Diffstat (limited to 'lib/rt-thread/SConscript')
| -rw-r--r-- | lib/rt-thread/SConscript | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/rt-thread/SConscript b/lib/rt-thread/SConscript new file mode 100644 index 000000000..205e12958 --- /dev/null +++ b/lib/rt-thread/SConscript @@ -0,0 +1,42 @@ +import rtconfig +from building import * + +cwd = GetCurrentDir() +src = Split(""" +../../src/tusb.c +../../src/common/tusb_fifo.c +../../src/device/usbd.c +../../src/device/usbd_control.c +./tusb_rt_thread_port.c +""") +path = [cwd, cwd + "/../../src"] + +# BSP +if GetDepend(["SOC_FAMILY_STM32"]): + src += ["../../src/portable/synopsys/dwc2/dcd_dwc2.c", + "../../src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c"] + +if GetDepend(["SOC_NRF52840"]): + src += ["../../src/portable/nordic/nrf5x/dcd_nrf5x.c"] + +if GetDepend(["SOC_FAMILY_RENESAS"]): + src += ["../../src/portable/renesas/rusb2/dcd_rusb2.c", + "../../src/portable/renesas/rusb2/rusb2_common.c"] + +# Device class +if GetDepend(["PKG_TINYUSB_DEVICE_CDC"]): + src += ["../../src/class/cdc/cdc_device.c"] + +if GetDepend(["PKG_TINYUSB_DEVICE_MSC"]): + src += ["../../src/class/msc/msc_device.c", "port/msc_device_port.c"] + +LOCAL_CFLAGS = '' + +if rtconfig.PLATFORM == 'gcc' or rtconfig.PLATFORM == 'armclang': # GCC or Keil AC6 + LOCAL_CFLAGS += ' -std=c99' +elif rtconfig.PLATFORM == 'armcc': # Keil AC5 + LOCAL_CFLAGS += ' --c99 --gnu' + +group = DefineGroup('TinyUSB', src, depend = ['PKG_USING_TINYUSB'], CPPPATH = path, LOCAL_CFLAGS = LOCAL_CFLAGS) + +Return('group') |
