summaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
authorzhugengyu <[email protected]>2024-08-09 22:43:22 +0800
committerGitHub <[email protected]>2024-08-09 22:43:22 +0800
commit18d9c21553b3295c49990cce967468f80a2ecb08 (patch)
tree65ddef13d50aeee3e2d9125b33dee26cee3561fc /SConscript
parentcbd6955bdea31ed5d475c22fa8a5c19cc5b3893e (diff)
Add PUSB2 and XHCI driver and RTOS glue (#236)
Diffstat (limited to 'SConscript')
-rw-r--r--SConscript31
1 files changed, 31 insertions, 0 deletions
diff --git a/SConscript b/SConscript
index 6cb35961..4270ee37 100644
--- a/SConscript
+++ b/SConscript
@@ -15,6 +15,8 @@ path += [cwd + '/class/vendor/net']
path += [cwd + '/class/vendor/serial']
src = []
+LIBS = []
+LIBPATH = []
CPPDEFINES = []
# USB DEVICE
@@ -68,6 +70,15 @@ if GetDepend(['PKG_CHERRYUSB_DEVICE']):
src += Glob('port/ch32/usb_dc_usbhs.c')
else:
src += Glob('port/ch32/usb_dc_usbfs.c')
+ if GetDepend(['PKG_CHERRYUSB_DEVICE_PUSB2']):
+ path += [cwd + '/port/xhci/rt-thread']
+ src += Glob('port/pusb2/rt-thread/usb_dc_glue_phytium.c')
+ if GetDepend(['ARCH_ARMV8']):
+ LIBPATH = [cwd + '/port/pusb2']
+ LIBS = ['libpusb2_dc_a64.a']
+ if GetDepend(['ARCH_ARM_CORTEX_A']):
+ LIBPATH = [cwd + '/port/pusb2']
+ LIBS = ['libpusb2_dc_a32_softfp_neon.a']
if GetDepend(['PKG_CHERRYUSB_DEVICE_CDC_ACM']):
src += Glob('class/cdc/usbd_cdc.c')
@@ -169,6 +180,26 @@ if GetDepend(['PKG_CHERRYUSB_HOST']):
src += Glob('port/musb/usb_glue_bk.c')
if GetDepend(['PKG_CHERRYUSB_HOST_MUSB_CUSTOM']):
src += Glob('port/musb/usb_hc_musb.c')
+ if GetDepend(['PKG_CHERRYUSB_HOST_PUSB2']):
+ path += [cwd + '/port/pusb2/rt-thread']
+ src += Glob('port/pusb2/rt-thread/usb_hc_glue_phytium.c')
+ if GetDepend(['ARCH_ARMV8']):
+ LIBPATH = [cwd + '/port/pusb2']
+ LIBS = ['libpusb2_hc_a64.a']
+ if GetDepend(['ARCH_ARM_CORTEX_A']):
+ LIBPATH = [cwd + '/port/pusb2']
+ LIBS = ['libpusb2_hc_a32_softfp_neon.a']
+
+ if GetDepend(['PKG_CHERRYUSB_HOST_XHCI']):
+ path += [cwd + '/port/xhci/phytium/rt-thread']
+ src += Glob('port/xhci/phytium/rt-thread/usb_glue_phytium_plat.c')
+ src += Glob('port/xhci/phytium/rt-thread/usb_glue_phytium.c')
+ if GetDepend(['ARCH_ARMV8']):
+ LIBPATH = [cwd + '/port/xhci/phytium']
+ LIBS = ['libxhci_a64.a']
+ if GetDepend(['ARCH_ARM_CORTEX_A']):
+ LIBPATH = [cwd + '/port/xhci/phytium']
+ LIBS = ['libxhci_a32_softfp_neon.a']
if GetDepend(['PKG_CHERRYUSB_HOST_CDC_ACM']):
src += Glob('class/cdc/usbh_cdc_acm.c')