您尚未登录。

楼主 # 2022-05-22 18:38:27

sakumisu
会员
注册时间: 2022-02-09
已发帖子: 8
积分: 38

基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

CherryUSB 是一个开源的小型 USB 主从协议栈,已经完成 musb 在全志部分芯片上的使用,有兴趣的可以玩玩,后续我也会整合到 xboot 大佬的仓库中。演示效果见上传的文件。从机演示的是 cdc 的测试,主机演示的是 cdc、hid、msc、rndis的测试。

仓库链接:https://github.com/sakumisu/cherryusb_rtt_f1c100s

离线

#1 2022-05-22 21:49:56

aozima
会员
所在地: 深圳
注册时间: 2019-05-25
已发帖子: 451
积分: 318.5
个人网站

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

给大佬点赞!

离线

#2 2022-05-23 09:48:38

xboot
会员
注册时间: 2019-10-15
已发帖子: 675
积分: 421

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

给大佬点赞!!!,一直期待CherryUSB

离线

#3 2022-05-23 13:47:54

jiangheng
会员
注册时间: 2022-03-27
已发帖子: 11
积分: 1

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

给大佬点赞!

离线

#4 2022-05-23 15:42:55

jasonhu
会员
注册时间: 2020-12-22
已发帖子: 20
积分: 59

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

给大佬点赞!

离线

#5 2022-05-23 17:11:50

tianjjff
会员
注册时间: 2018-12-24
已发帖子: 129
积分: 22

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

给大佬点赞!大佬牛逼

离线

#6 2022-05-29 23:24:58

三七鸽
会员
注册时间: 2020-04-11
已发帖子: 4
积分: 4

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

build/applications/main.o: In function `usbd_cdc_start':
main.c:(.text.usbd_cdc_start+0x4): undefined reference to `cdc_acm_init'
build/applications/main.o: In function `usbd_cdc_send':
main.c:(.text.usbd_cdc_send+0x4): undefined reference to `cdc_acm_data_send_with_dtr_test'
build/applications/main.o: In function `usbh_start':
main.c:(.text.usbh_start+0x4): undefined reference to `usbh_initialize'

大佬,github上源码编译不过,麻烦指教下,谢谢

离线

楼主 #7 2022-05-30 12:23:17

sakumisu
会员
注册时间: 2022-02-09
已发帖子: 8
积分: 38

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

@三七鸽
先使用 pkgs --update 更新 package,拉取协议栈代码

最近编辑记录 sakumisu (2022-05-30 12:24:19)

离线

#8 2022-06-02 23:24:45

三七鸽
会员
注册时间: 2020-04-11
已发帖子: 4
积分: 4

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

大佬:我跑例程,为什么msh输入usbh_start 报这个错误,求支援,谢谢
msh />(rt_object_get_type(&sem->parent.parent) == RT_Object_Class_Semaphore) assertion failed at function:rt_sem_release, line number:613

离线

楼主 #9 2022-06-02 23:53:50

sakumisu
会员
注册时间: 2022-02-09
已发帖子: 8
积分: 38

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

三七鸽 说:

大佬:我跑例程,为什么msh输入usbh_start 报这个错误,求支援,谢谢
msh />(rt_object_get_type(&sem->parent.parent) == RT_Object_Class_Semaphore) assertion failed at function:rt_sem_release, line number:613

你好,不知道论坛能不能发QQ,你可以加我QQ1203593632详细看下,这个问题貌似是printf问题

最近编辑记录 sakumisu (2022-06-02 23:54:47)

离线

#10 2022-06-03 00:02:29

三七鸽
会员
注册时间: 2020-04-11
已发帖子: 4
积分: 4

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

@sakumisu
好的,已加你qq,感谢

离线

楼主 #12 2022-06-04 15:44:10

sakumisu
会员
注册时间: 2022-02-09
已发帖子: 8
积分: 38

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

不好意思,之前忘记点击引用了,视频没上传。
@sakumisu

最近编辑记录 sakumisu (2022-06-04 15:44:43)

离线

#13 2022-07-01 23:04:16

xfdr0805
会员
注册时间: 2020-07-23
已发帖子: 291
积分: 344

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

LINK rtthread.elf
build\packages\CherryUSB-latest\core\usbh_core.o: In function `usbh_initialize':
usbh_core.c:(.text.usbh_initialize+0x8c): undefined reference to `_usbh_class_info_end'
usbh_core.c:(.text.usbh_initialize+0x90): undefined reference to `_usbh_class_info_start'
collect2.exe: error: ld returned 1 exit status
scons: *** [rtthread.elf] Error 1
scons: building terminated because of errors.

大佬,usbd_cdc 我测试没问题,但是usbh编译不过去,是什么原因呢?

离线

楼主 #14 2022-07-02 00:05:38

sakumisu
会员
注册时间: 2022-02-09
已发帖子: 8
积分: 38

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

@xfdr0805
链接脚本中需要添加section。参考文档最后:https://cherryusb.readthedocs.io/zh_CN/latest/quick_start/other_chip.html

最近编辑记录 sakumisu (2022-07-02 00:07:01)

离线

#15 2022-07-02 15:40:30

xfdr0805
会员
注册时间: 2020-07-23
已发帖子: 291
积分: 344

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

感谢指点,添加了就OK了,大佬开发的cherryusb框架真棒,使用起来超级方便,已经star

离线

楼主 #16 2022-07-02 16:21:15

sakumisu
会员
注册时间: 2022-02-09
已发帖子: 8
积分: 38

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

xfdr0805 说:

感谢指点,添加了就OK了,大佬开发的cherryusb框架真棒,使用起来超级方便,已经star

感谢!还望多多帮忙宣传哈哈

离线

#17 2022-09-27 08:30:11

Yohann_HE
会员
注册时间: 2021-10-09
已发帖子: 3
积分: 3

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

sakumisu 说:

@xfdr0805
链接脚本中需要添加section。参考文档最后:https://cherryusb.readthedocs.io/zh_CN/latest/quick_start/other_chip.html

大佬,这个编译不过,提示几处未定义参数,但是项目中能够查到定义,请问这个是什么问题?
In file included from packages\CherryUSB-latest\class\cdc\usbh_cdc_acm.c:6:0:
packages\CherryUSB-latest\core/usbh_core.h:119:29: error: 'CONFIG_USBHOST_MAX_ENDPOINTS' undeclared here (not in a function)
     struct usbh_endpoint ep[CONFIG_USBHOST_MAX_ENDPOINTS];
                             ^
packages\CherryUSB-latest\core/usbh_core.h:123:49: error: 'CONFIG_USBHOST_MAX_INTF_ALTSETTINGS' undeclared here (not in a function)
     struct usbh_interface_altsetting altsetting[CONFIG_USBHOST_MAX_INTF_ALTSETTINGS];
                                                 ^
packages\CherryUSB-latest\core/usbh_core.h:132:32: error: 'CONFIG_USBHOST_MAX_INTERFACES' undeclared here (not in a function)
     struct usbh_interface intf[CONFIG_USBHOST_MAX_INTERFACES];
                                ^
packages\CherryUSB-latest\core/usbh_core.h:161:31: error: 'CONFIG_USBHOST_MAX_EHPORTS' undeclared here (not in a function)
     struct usbh_hubport child[CONFIG_USBHOST_MAX_EHPORTS];
                               ^
scons: *** [build\packages\CherryUSB-latest\class\cdc\usbh_cdc_acm.o] Error 1
scons: building terminated because of errors.

离线

楼主 #18 2022-09-27 09:41:02

sakumisu
会员
注册时间: 2022-02-09
已发帖子: 8
积分: 38

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

@Yohann_HE

更新 usb_config.h

离线

#20 2023-11-09 13:01:34

belen
会员
注册时间: 2023-09-04
已发帖子: 29
积分: 14

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

程序烧进去,没跑起来是什么情况呀?
RTT.png

离线

#21 2023-11-09 18:42:33

tongshezheng
会员
注册时间: 2023-11-08
已发帖子: 10
积分: 0

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

移植到FREERTOS,可行吗?

离线

#22 2023-11-09 21:54:09

506826164@qq.com
会员
注册时间: 2022-08-07
已发帖子: 46
积分: 71

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

tongshezheng 说:

移植到FREERTOS,可行吗?

完全可以,cherryusb的osal层有适配freertos

离线

#23 2023-11-10 16:13:30

belen
会员
注册时间: 2023-09-04
已发帖子: 29
积分: 14

Re: 基于 rt-thread os 运行 cherryusb 协议栈在 f1c00s 上

506826164@qq.com 说:
tongshezheng 说:

移植到FREERTOS,可行吗?

完全可以,cherryusb的osal层有适配freertos

试了一下,在F1C100S上还是很吃力的。很多系统的函数都需要自己来实现

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn