Skip to content

Commit 669a682

Browse files
sakumisumysterywolf
authored andcommitted
update(cherryusb): update to v1.4.0
1 parent cbf6b64 commit 669a682

File tree

132 files changed

+9775
-1491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+9775
-1491
lines changed

components/drivers/usb/cherryusb/Kconfig

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ if RT_USING_CHERRYUSB
4848
bool "musb_bk"
4949
config RT_CHERRYUSB_DEVICE_MUSB_CUSTOM
5050
bool "musb_custom"
51+
config RT_CHERRYUSB_DEVICE_CHIPIDEA_MCX
52+
bool "chipidea_mcx"
53+
config RT_CHERRYUSB_DEVICE_CHIPIDEA_CUSTOM
54+
bool "chipidea_custom"
5155
config RT_CHERRYUSB_DEVICE_BL
5256
bool "bouffalo"
5357
config RT_CHERRYUSB_DEVICE_CH32
@@ -162,10 +166,12 @@ if RT_USING_CHERRYUSB
162166
bool "ehci_hpm"
163167
config RT_CHERRYUSB_HOST_EHCI_AIC
164168
bool "ehci_aic"
165-
config RT_CHERRYUSB_HOST_EHCI_NUVOTON_NUC980
166-
bool "ehci_nuvoton_nuc980"
167-
config RT_CHERRYUSB_HOST_EHCI_NUVOTON_MA35D0
168-
bool "ehci_nuvoton_ma35d0"
169+
config RT_CHERRYUSB_HOST_EHCI_MCX
170+
bool "ehci_mcx"
171+
config RT_CHERRYUSB_HOST_EHCI_NUC980
172+
bool "ehci_nuc980"
173+
config RT_CHERRYUSB_HOST_EHCI_MA35D0
174+
bool "ehci_ma35d0"
169175
config RT_CHERRYUSB_HOST_EHCI_CUSTOM
170176
bool "ehci_custom"
171177
config RT_CHERRYUSB_HOST_DWC2_ST
@@ -294,7 +300,7 @@ if RT_USING_CHERRYUSB
294300
config CONFIG_USBHOST_PLATFORM_RTL8152
295301
bool
296302

297-
config CHERRYUSB_HOST_TEMPLATE
303+
config RT_CHERRYUSB_HOST_TEMPLATE
298304
bool
299305
prompt "Use usb host template"
300306
default n

components/drivers/usb/cherryusb/README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ In order to make it easier for users to learn USB basics, enumeration, driver lo
1717
- Class-drivers and porting-drivers are templating and simplification
1818
- Clear API classification (slave: initialisation, registration api, command callback api, data sending and receiving api; host: initialisation, lookup api, data sending and receiving api)
1919

20-
### Easy to use USB
20+
### Easy to use USB
2121

2222
In order to facilitate the use of the USB interface and to take into account the fact that users have learned about uart and dma, the following advantages have been designed for the data sending and receiving class of interface:
2323

@@ -34,7 +34,7 @@ Taking into account USB performance issues and trying to achieve the theoretical
3434
- Unlimited length make it easier to interface with hardware DMA and take advantage of DMA
3535
- Subcontracting function is handled in interrupt
3636

37-
## Directoy Structure
37+
## Directory Structure
3838

3939
| Directory | Description |
4040
|:-------------:|:---------------------------:|
@@ -65,15 +65,17 @@ CherryUSB Device Stack has the following functions:
6565
- Support Device Firmware Upgrade CLASS (DFU)
6666
- Support USB MIDI CLASS (MIDI)
6767
- Support Remote NDIS (RNDIS)
68-
- Support WINUSB1.0、WINUSB2.0(with BOS)
68+
- Support WINUSB1.0、WINUSB2.0、WEBUSB、BOS
6969
- Support Vendor class
70+
- Support UF2
71+
- Support Android Debug Bridge (Only support shell)
7072
- Support multi device with the same USB IP
7173

7274
CherryUSB Device Stack resource usage (GCC 10.2 with -O2):
7375

7476
| file | FLASH (Byte) | No Cache RAM (Byte) | RAM (Byte) | Heap (Byte) |
7577
|:-------------:|:--------------:|:-------------------------:|:-------------:|:----------------:|
76-
|usbd_core.c | 3516 | 256(default) + 320 | 0 | 0 |
78+
|usbd_core.c | 3516 | 512(default) + 320 | 0 | 0 |
7779
|usbd_cdc.c | 392 | 0 | 0 | 0 |
7880
|usbd_msc.c | 2839 | 128 + 512(default) | 16 | 0 |
7981
|usbd_hid.c | 364 | 0 | 0 | 0 |
@@ -87,6 +89,7 @@ The CherryUSB Host Stack has a standard enumeration implementation for devices m
8789

8890
CherryUSB Host Stack has the following functions:
8991

92+
- Support low speed, full speed, high speed and super speed devices
9093
- Automatic loading of supported Class drivers
9194
- Support blocking transfers and asynchronous transfers
9295
- Support Composite Device
@@ -98,7 +101,7 @@ CherryUSB Host Stack has the following functions:
98101
- Support USB Audio CLASS (UAC1.0)
99102
- Support Remote NDIS (RNDIS)
100103
- Support USB Bluetooth class (support nimble and zephyr bluetooth stack, support **CLASS:0xE0** or vendor class like cdc acm)
101-
- Support Vendor class
104+
- Support Vendor class (serial, net, wifi)
102105
- Support USB modeswitch
103106
- Support multi host with the same USB IP
104107

@@ -108,7 +111,7 @@ CherryUSB Host Stack resource usage (GCC 10.2 with -O2):
108111

109112
| file | FLASH (Byte) | No Cache RAM (Byte) | RAM (Byte) | Heap (Byte) |
110113
|:-------------:|:--------------:|:-------------------------------:|:---------------------------:|:------------:|
111-
|usbh_core.c | ~7700 | 512 + 8 * (1+x) *n | 28 | 0 |
114+
|usbh_core.c | ~7700 | 512 + 8 * (1+x) *n | 28 | raw_config_desc |
112115
|usbh_hub.c | ~5600 | 32 + 4* (1+x) | 12 + sizeof(struct usbh_hub) * (1+x) | 0 |
113116
|usbh_cdc_acm.c | ~1200 | 7 | 4 + sizeof(struct usbh_cdc_acm) * x | 0 |
114117
|usbh_msc.c | ~2500 | 32 | 4 + sizeof(struct usbh_msc) * x | 0 |
@@ -152,6 +155,7 @@ Only standard and commercial USB IP are listed.
152155
| DWC2(synopsys) | DWC2 | DWC2 ||
153156
| MUSB(mentor) | MUSB | MUSB ||
154157
| FOTG210(faraday)| FOTG210 | EHCI ||
158+
| CHIPIDEA(synopsys)| CHIPIDEA | EHCI ||
155159
| CDNS2(cadence) | CDNS2 | CDNS2 ||
156160
| CDNS3(cadence) | CDNS3 | XHCI | × |
157161
| DWC3(synopsys) | DWC3 | XHCI | × |
@@ -175,17 +179,26 @@ USB basic concepts and how the CherryUSB Device stack is implemented, see [Cherr
175179
|Bouffalolab | BL702/BL616/BL808 | bouffalolab/ehci|[bouffalo_sdk](https://github.com/CherryUSB/bouffalo_sdk)|<= latest | Long-term |
176180
|ST | STM32F1x | fsdev |[stm32_repo](https://github.com/CherryUSB/cherryusb_stm32)|<= latest | Long-term |
177181
|ST | STM32F4/STM32H7 | dwc2 |[stm32_repo](https://github.com/CherryUSB/cherryusb_stm32)|<= latest | Long-term |
178-
|HPMicro | HPM6750 | hpm/ehci |[hpm_sdk](https://github.com/CherryUSB/hpm_sdk)|<= latest | Long-term |
182+
|HPMicro | HPM6000/HPM5000 | hpm/ehci |[hpm_sdk](https://github.com/CherryUSB/hpm_sdk)|<= latest | Long-term |
179183
|Essemi | ES32F36xx | musb |[es32f369_repo](https://github.com/CherryUSB/cherryusb_es32)|<= latest | Long-term |
180-
|Phytium | e2000 | pusb2/xhci |[phytium_repo](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk)|v0.10.2 | Long-term |
184+
|Phytium | e2000 | pusb2/xhci |[phytium_repo](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk)|>=1.4.0 | Long-term |
181185
|Artinchip | d12x/d13x/d21x | aic/ehci/ohci |[luban-lite](https://gitee.com/artinchip/luban-lite)|<= latest | Long-term |
182-
|Espressif | esp32s2/esp32s3 | dwc2 |[esp32_repo](https://github.com/CherryUSB/cherryusb_esp32)|<= latest | the same with ST |
183-
|AllwinnerTech | F1C100S/F1C200S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|<= latest | the same with Essemi |
184-
|Bekencorp | bk7256/bk7258 | musb |[bk_idk](https://github.com/CherryUSB/bk_idk)| v0.7.0 | the same with Essemi |
185-
|Sophgo | cv18xx | dwc2 |[cvi_alios_open](https://github.com/CherryUSB/cvi_alios_open)| v0.7.0 | the same with ST |
186+
|Espressif | esp32s2/esp32s3/esp32p4 | dwc2 |[esp32_repo](https://github.com/CherryUSB/cherryusb_esp32)|<= latest | Long-term |
187+
|NXP | mcx | chipidea/ehci |[nxp_mcx_repo](https://github.com/CherryUSB/cherryusb_mcx)|<= latest | Long-term |
188+
|AllwinnerTech | F1C100S/F1C200S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|<= latest | the same with musb |
189+
|Bekencorp | bk7256/bk7258 | musb |[bk_idk](https://github.com/CherryUSB/bk_idk)| v0.7.0 | the same with musb |
190+
|Sophgo | cv18xx | dwc2 |[cvi_alios_open](https://github.com/CherryUSB/cvi_alios_open)| v0.7.0 | TBD |
186191
|WCH | CH32V307/ch58x | ch32_usbfs/ch32_usbhs/ch58x |[wch_repo](https://github.com/CherryUSB/cherryusb_wch)|<= v0.10.2 | TBD |
187192
|Raspberry pi | rp2040 | rp2040 |[pico-examples](https://github.com/CherryUSB/pico-examples)|<= v0.10.2 | No more updated |
188193

194+
## Package Support
195+
196+
CherryUSB package is available as follows:
197+
198+
- [RT-Thread](https://packages.rt-thread.org/detail.html?package=CherryUSB)
199+
- [YOC](https://www.xrvm.cn/document?temp=usb-host-protocol-stack-device-driver-adaptation-instructions&slug=yocbook)
200+
- [ESP-Registry](https://components.espressif.com/components/cherry-embedded/cherryusb)
201+
189202
## Commercial Support
190203

191204
Refer to https://cherryusb.readthedocs.io/zh-cn/latest/support/index.html.
@@ -198,4 +211,4 @@ CherryUSB discord: https://discord.com/invite/wFfvrSAey8.
198211

199212
Thanks to the following companies for their support (in no particular order).
200213

201-
<img src="docs/assets/bouffalolab.jpg" width="100" height="100"/> <img src="docs/assets/hpmicro.jpg" width="100" height="100" /> <img src="docs/assets/eastsoft.jpg" width="100" height="100" /> <img src="docs/assets/rtthread.jpg" width="100" height="100" /> <img src="docs/assets/sophgo.jpg" width="100" height="100" /> <img src="docs/assets/phytium.jpg" width="100" height="100" /> <img src="docs/assets/thead.jpg" width="100" height="100" /> <img src="docs/assets/nuvoton.jpg" width="100" height="100" /> <img src="docs/assets/artinchip.jpg" width="100" height="100" /> <img src="docs/assets/bekencorp.jpg" width="100" height="100" />
214+
<img src="docs/assets/bouffalolab.jpg" width="100" height="100"/> <img src="docs/assets/hpmicro.jpg" width="100" height="100" /> <img src="docs/assets/eastsoft.jpg" width="100" height="100" /> <img src="docs/assets/rtthread.jpg" width="100" height="100" /> <img src="docs/assets/sophgo.jpg" width="100" height="100" /> <img src="docs/assets/phytium.jpg" width="100" height="100" /> <img src="docs/assets/thead.jpg" width="100" height="100" /> <img src="docs/assets/nuvoton.jpg" width="100" height="100" /> <img src="docs/assets/artinchip.jpg" width="100" height="100" /> <img src="docs/assets/bekencorp.jpg" width="100" height="100" />

components/drivers/usb/cherryusb/README_zh.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,17 @@ CherryUSB Device 协议栈当前实现以下功能:
6565
- 支持 Device Firmware Upgrade CLASS (DFU)
6666
- 支持 USB MIDI CLASS (MIDI)
6767
- 支持 Remote NDIS (RNDIS)
68-
- 支持 WINUSB1.0、WINUSB2.0(带 BOS )
68+
- 支持 WINUSB1.0、WINUSB2.0、WEBUSB、BOS
6969
- 支持 Vendor 类 class
70+
- 支持 UF2
71+
- 支持 Android Debug Bridge (Only support shell)
7072
- 支持相同 USB IP 的多从机
7173

7274
CherryUSB Device 协议栈资源占用说明(GCC 10.2 with -O2):
7375

7476
| file | FLASH (Byte) | No Cache RAM (Byte) | RAM (Byte) | Heap (Byte) |
7577
|:-------------:|:--------------:|:-------------------------:|:-------------:|:----------------:|
76-
|usbd_core.c | 3516 | 256(default) + 320 | 0 | 0 |
78+
|usbd_core.c | 3516 | 512(default) + 320 | 0 | 0 |
7779
|usbd_cdc.c | 392 | 0 | 0 | 0 |
7880
|usbd_msc.c | 2839 | 128 + 512(default) | 16 | 0 |
7981
|usbd_hid.c | 364 | 0 | 0 | 0 |
@@ -87,6 +89,7 @@ CherryUSB Host 协议栈对挂载在 roothub、外部 hub 上的设备规范了
8789

8890
CherryUSB Host 协议栈当前实现以下功能:
8991

92+
- 支持 low speed, full speed, high speed 和 super speed 设备
9093
- 自动加载支持的Class 驱动
9194
- 支持阻塞式传输和异步传输
9295
- 支持复合设备
@@ -98,7 +101,7 @@ CherryUSB Host 协议栈当前实现以下功能:
98101
- Support USB Audio CLASS (UAC1.0)
99102
- 支持 Remote NDIS (RNDIS)
100103
- 支持 USB Bluetooth (支持 nimble and zephyr bluetooth 协议栈,支持 **CLASS: 0xE0** 或者厂家自定义类,类似于 cdc acm 功能)
101-
- 支持 Vendor 类 class
104+
- 支持 Vendor 类 class (serial, net, wifi)
102105
- 支持 USB modeswitch
103106
- 支持相同 USB IP 的多主机
104107

@@ -108,7 +111,7 @@ CherryUSB Host 协议栈资源占用说明(GCC 10.2 with -O2):
108111

109112
| file | FLASH (Byte) | No Cache RAM (Byte) | RAM (Byte) | Heap (Byte) |
110113
|:-------------:|:--------------:|:-------------------------------:|:---------------------------:|:------------:|
111-
|usbh_core.c | ~7700 | 512 + 8 * (1+x) *n | 28 | 0 |
114+
|usbh_core.c | ~7700 | 512 + 8 * (1+x) *n | 28 | raw_config_desc |
112115
|usbh_hub.c | ~5600 | 32 + 4* (1+x) | 12 + sizeof(struct usbh_hub) * (1+x) | 0 |
113116
|usbh_cdc_acm.c | ~1200 | 7 | 4 + sizeof(struct usbh_cdc_acm) * x | 0 |
114117
|usbh_msc.c | ~2500 | 32 | 4 + sizeof(struct usbh_msc) * x | 0 |
@@ -152,6 +155,7 @@ x 受以下宏影响:
152155
| DWC2(synopsys) | DWC2 | DWC2 ||
153156
| MUSB(mentor) | MUSB | MUSB ||
154157
| FOTG210(faraday)| FOTG210 | EHCI ||
158+
| CHIPIDEA(synopsys)| CHIPIDEA | EHCI ||
155159
| CDNS2(cadence) | CDNS2 | CDNS2 ||
156160
| CDNS3(cadence) | CDNS3 | XHCI | × |
157161
| DWC3(synopsys) | DWC3 | XHCI | × |
@@ -176,20 +180,29 @@ CherryUSB 快速入门、USB 基本概念,API 手册,Class 基本概念和
176180
|Bouffalolab | BL702/BL616/BL808 | bouffalolab/ehci|[bouffalo_sdk](https://github.com/CherryUSB/bouffalo_sdk)|<= latest | Long-term |
177181
|ST | STM32F1x | fsdev |[stm32_repo](https://github.com/CherryUSB/cherryusb_stm32)|<= latest | Long-term |
178182
|ST | STM32F4/STM32H7 | dwc2 |[stm32_repo](https://github.com/CherryUSB/cherryusb_stm32)|<= latest | Long-term |
179-
|HPMicro | HPM6750 | hpm/ehci |[hpm_sdk](https://github.com/CherryUSB/hpm_sdk)|<= latest | Long-term |
183+
|HPMicro | HPM6000/HPM5000 | hpm/ehci |[hpm_sdk](https://github.com/CherryUSB/hpm_sdk)|<= latest | Long-term |
180184
|Essemi | ES32F36xx | musb |[es32f369_repo](https://github.com/CherryUSB/cherryusb_es32)|<= latest | Long-term |
181-
|Phytium | e2000 | pusb2/xhci |[phytium_repo](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk)|v0.10.2 | Long-term |
185+
|Phytium | e2000 | pusb2/xhci |[phytium_repo](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk)|>=1.4.0 | Long-term |
182186
|Artinchip | d12x/d13x/d21x | aic/ehci/ohci |[luban-lite](https://gitee.com/artinchip/luban-lite)|<= latest | Long-term |
183-
|Espressif | esp32s2/esp32s3 | dwc2 |[esp32_repo](https://github.com/CherryUSB/cherryusb_esp32)|<= latest | the same with ST |
184-
|AllwinnerTech | F1C100S/F1C200S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|<= latest | the same with Essemi |
185-
|Bekencorp | bk7256/bk7258 | musb |[bk_idk](https://github.com/CherryUSB/bk_idk)| v0.7.0 | the same with Essemi |
186-
|Sophgo | cv18xx | dwc2 |[cvi_alios_open](https://github.com/CherryUSB/cvi_alios_open)| v0.7.0 | the same with ST |
187+
|Espressif | esp32s2/esp32s3/esp32p4 | dwc2 |[esp32_repo](https://github.com/CherryUSB/cherryusb_esp32)|<= latest | Long-term |
188+
|NXP | mcx | chipidea/ehci |[nxp_mcx_repo](https://github.com/CherryUSB/cherryusb_mcx)|<= latest | Long-term |
189+
|AllwinnerTech | F1C100S/F1C200S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|<= latest | the same with musb |
190+
|Bekencorp | bk7256/bk7258 | musb |[bk_idk](https://github.com/CherryUSB/bk_idk)| v0.7.0 | the same with musb |
191+
|Sophgo | cv18xx | dwc2 |[cvi_alios_open](https://github.com/CherryUSB/cvi_alios_open)| v0.7.0 | TBD |
187192
|WCH | CH32V307/ch58x | ch32_usbfs/ch32_usbhs/ch58x |[wch_repo](https://github.com/CherryUSB/cherryusb_wch)|<= v0.10.2 | TBD |
188193
|Raspberry pi | rp2040 | rp2040 |[pico-examples](https://github.com/CherryUSB/pico-examples)|<= v0.10.2 | No more updated |
189194

195+
## 软件包支持
196+
197+
CherryUSB 软件包可以通过以下方式获取:
198+
199+
- [RT-Thread](https://packages.rt-thread.org/detail.html?package=CherryUSB)
200+
- [YOC](https://www.xrvm.cn/document?temp=usb-host-protocol-stack-device-driver-adaptation-instructions&slug=yocbook)
201+
- [ESP-Registry](https://components.espressif.com/components/cherry-embedded/cherryusb)
202+
190203
## 商业支持
191204

192-
参考 https://cherryusb.readthedocs.io/zh-cn/latest/support/index.html。
205+
参考 https://cherryusb.readthedocs.io/zh-cn/latest/support/index.html
193206

194207
## 联系
195208

components/drivers/usb/cherryusb/SConscript

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ path += [cwd + '/class/vendor/net']
1515
path += [cwd + '/class/vendor/serial']
1616
src = []
1717

18+
LIBS = []
19+
LIBPATH = []
1820
CPPDEFINES = []
1921

2022
# USB DEVICE
@@ -56,6 +58,9 @@ if GetDepend(['RT_CHERRYUSB_DEVICE']):
5658
src += Glob('port/musb/usb_glue_bk.c')
5759
if GetDepend(['RT_CHERRYUSB_DEVICE_MUSB_CUSTOM']):
5860
src += Glob('port/musb/usb_dc_musb.c')
61+
if GetDepend(['RT_CHERRYUSB_DEVICE_CHIPIDEA_MCX']):
62+
src += Glob('port/chipidea/usb_dc_chipidea.c')
63+
src += Glob('port/chipidea/usb_glue_mcx.c')
5964
if GetDepend(['RT_CHERRYUSB_DEVICE_BL']):
6065
src += Glob('port/bouffalolab/usb_dc_bl.c')
6166
if GetDepend(['RT_CHERRYUSB_DEVICE_HPM']):
@@ -68,6 +73,15 @@ if GetDepend(['RT_CHERRYUSB_DEVICE']):
6873
src += Glob('port/ch32/usb_dc_usbhs.c')
6974
else:
7075
src += Glob('port/ch32/usb_dc_usbfs.c')
76+
if GetDepend(['RT_CHERRYUSB_DEVICE_PUSB2']):
77+
path += [cwd + '/port/xhci/rt-thread']
78+
src += Glob('port/pusb2/rt-thread/usb_dc_glue_phytium.c')
79+
if GetDepend(['ARCH_ARMV8']):
80+
LIBPATH = [cwd + '/port/pusb2']
81+
LIBS = ['libpusb2_dc_a64.a']
82+
if GetDepend(['ARCH_ARM_CORTEX_A']):
83+
LIBPATH = [cwd + '/port/pusb2']
84+
LIBS = ['libpusb2_dc_a32_softfp_neon.a']
7185

7286
if GetDepend(['RT_CHERRYUSB_DEVICE_CDC_ACM']):
7387
src += Glob('class/cdc/usbd_cdc.c')
@@ -140,10 +154,14 @@ if GetDepend(['RT_CHERRYUSB_HOST']):
140154
src += Glob('port/ehci/usb_hc_ehci.c')
141155
src += Glob('port/ehci/usb_glue_aic.c')
142156
src += Glob('port/ohci/usb_hc_ohci.c')
143-
if GetDepend(['RT_CHERRYUSB_HOST_EHCI_NUVOTON_NUC980']):
157+
if GetDepend(['RT_CHERRYUSB_HOST_EHCI_MCX']):
158+
path += [cwd + '/port/chipidea']
159+
src += Glob('port/ehci/usb_hc_ehci.c')
160+
src += Glob('port/ehci/usb_glue_mcx.c')
161+
if GetDepend(['RT_CHERRYUSB_HOST_EHCI_NUC980']):
144162
src += Glob('port/ehci/usb_hc_ehci.c')
145163
src += Glob('port/ehci/usb_glue_nuc980.c')
146-
if GetDepend(['RT_CHERRYUSB_HOST_EHCI_NUVOTON_MA35D0']):
164+
if GetDepend(['RT_CHERRYUSB_HOST_EHCI_MA35D0']):
147165
src += Glob('port/ehci/usb_hc_ehci.c')
148166
src += Glob('port/ehci/usb_glue_ma35d0.c')
149167
if GetDepend(['RT_CHERRYUSB_HOST_EHCI_CUSTOM']):
@@ -169,6 +187,26 @@ if GetDepend(['RT_CHERRYUSB_HOST']):
169187
src += Glob('port/musb/usb_glue_bk.c')
170188
if GetDepend(['RT_CHERRYUSB_HOST_MUSB_CUSTOM']):
171189
src += Glob('port/musb/usb_hc_musb.c')
190+
if GetDepend(['RT_CHERRYUSB_HOST_PUSB2']):
191+
path += [cwd + '/port/pusb2/rt-thread']
192+
src += Glob('port/pusb2/rt-thread/usb_hc_glue_phytium.c')
193+
if GetDepend(['ARCH_ARMV8']):
194+
LIBPATH = [cwd + '/port/pusb2']
195+
LIBS = ['libpusb2_hc_a64.a']
196+
if GetDepend(['ARCH_ARM_CORTEX_A']):
197+
LIBPATH = [cwd + '/port/pusb2']
198+
LIBS = ['libpusb2_hc_a32_softfp_neon.a']
199+
200+
if GetDepend(['RT_CHERRYUSB_HOST_XHCI']):
201+
path += [cwd + '/port/xhci/phytium/rt-thread']
202+
src += Glob('port/xhci/phytium/rt-thread/usb_glue_phytium_plat.c')
203+
src += Glob('port/xhci/phytium/rt-thread/usb_glue_phytium.c')
204+
if GetDepend(['ARCH_ARMV8']):
205+
LIBPATH = [cwd + '/port/xhci/phytium']
206+
LIBS = ['libxhci_a64.a']
207+
if GetDepend(['ARCH_ARM_CORTEX_A']):
208+
LIBPATH = [cwd + '/port/xhci/phytium']
209+
LIBS = ['libxhci_a32_softfp_neon.a']
172210

173211
if GetDepend(['RT_CHERRYUSB_HOST_CDC_ACM']):
174212
src += Glob('class/cdc/usbh_cdc_acm.c')

0 commit comments

Comments
 (0)