summaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-02-07 21:24:53 +0800
committersakumisu <[email protected]>2022-02-07 21:24:53 +0800
commitfeb5a8fb52326b5306c10b7a9c4838411af06b7c (patch)
tree4b797c1cbf63d3d3b835a2f4debbf8a4a79aef4c /SConscript
parent74d96498f9d81db8198b7aeadc024276703f0ea9 (diff)
update sconscript
Diffstat (limited to 'SConscript')
-rw-r--r--SConscript51
1 files changed, 33 insertions, 18 deletions
diff --git a/SConscript b/SConscript
index 7dca1787..e53b79e6 100644
--- a/SConscript
+++ b/SConscript
@@ -3,34 +3,35 @@ from building import *
cwd = GetCurrentDir()
path = [cwd + '/common']
path += [cwd + '/core']
-src = Glob('core/usbd_core.c')
+
CPPDEFINES = []
-if GetDepend(['PKG_CherryUSB_USING_HS']):
+if GetDepend(['PKG_CHERRYUSB_USING_HS']):
CPPDEFINES+=['CONFIG_USB_HS']
-elif GetDepend(['PKG_CherryUSB_USING_HS_IN_FULL']):
+elif GetDepend(['PKG_CHERRYUSB_USING_HS_IN_FULL']):
CPPDEFINES += ['CONFIG_USB_HS_IN_FULL']
-
+
# USB DEVICE
-if GetDepend(['PKG_CherryUSB_USING_DEVICE']):
- if GetDepend(['PKG_CherryUSB_USING_CDC']):
+if GetDepend(['PKG_CHERRYUSB_USING_DEVICE']):
+ src = Glob('core/usbd_core.c')
+ if GetDepend(['PKG_CHERRYUSB_USING_CDC']):
path += [cwd + '/class/cdc']
src += Glob('class/cdc/usbd_cdc.c')
- if GetDepend(['PKG_CherryUSB_USING_HID']):
+ if GetDepend(['PKG_CHERRYUSB_USING_HID']):
path += [cwd + '/class/hid']
- src += Glob('class/cdc/usbd_hid.c')
- if GetDepend(['PKG_CherryUSB_USING_DFU']):
+ src += Glob('class/cdc/usbd_hid.c')
+ if GetDepend(['PKG_CHERRYUSB_USING_DFU']):
path += [cwd + '/class/dfu']
src += Glob('class/cdc/usbd_dfu.c')
- if GetDepend(['PKG_CherryUSB_USING_HUB']):
+ if GetDepend(['PKG_CHERRYUSB_USING_HUB']):
path += [cwd + '/class/hub']
src += Glob('class/cdc/usbd_hub.c')
- if GetDepend(['PKG_CherryUSB_USING_AUDIO']):
+ if GetDepend(['PKG_CHERRYUSB_USING_AUDIO']):
path += [cwd + '/class/audio']
src += Glob('class/cdc/usbd_audio.c')
- if GetDepend(['PKG_CherryUSB_USING_VIDEO']):
+ if GetDepend(['PKG_CHERRYUSB_USING_VIDEO']):
path += [cwd + '/class/video']
src += Glob('class/cdc/usbd_video.c')
- if GetDepend(['PKG_CherryUSB_USING_MSC']):
+ if GetDepend(['PKG_CHERRYUSB_USING_MSC']):
path += [cwd + '/class/msc']
src += Glob('class/cdc/usbd_msc.c')
if GetDepend(['SOC_FAMILY_STM32']):
@@ -40,12 +41,26 @@ if GetDepend(['PKG_CherryUSB_USING_DEVICE']):
src += Glob('port/synopsys/usb_dc_synopsys.c')
if GetDepend(['SOC_SERIES_STM32H7']):
CPPDEFINES += ['STM32H7']
-
-# USB HOST
-if GetDepend(['PKG_CherryUSB_USING_HOST']):
- pass;
-group = DefineGroup('CherryUSB', src, depend = ['PKG_USING_CherryUSB'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+# USB HOST
+if GetDepend(['PKG_CHERRYUSB_USING_HOST']):
+ src = Glob('core/usbh_core.c')
+ path += [cwd + '/osal']
+ src += Glob('osal/usb_osal_rtthread.c')
+ src += Glob('osal/usb_workq.c')
+ path += [cwd + '/class/cdc']
+ src += Glob('class/cdc/usbh_cdc_acm.c')
+ path += [cwd + '/class/hid']
+ src += Glob('class/hid/usbh_hid.c')
+ path += [cwd + '/class/msc']
+ src += Glob('class/msc/usbh_msc.c')
+ path += [cwd + '/class/hub']
+ src += Glob('class/hub/usbdh_hub.c')
+
+ if GetDepend(['SOC_FAMILY_STM32']):
+ src += Glob('port/synopsys/usb_hc_synopsys.c')
+
+group = DefineGroup('CherryUSB', src, depend = ['PKG_USING_CHERRYUSB'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')