USB device mode

Christian Mauderer list at c-mauderer.de
Sat Jan 11 09:24:42 UTC 2020


Hello Tony

On 10/01/2020 16:57, Tony Whittam wrote:
> Hi,
> 
> Does anyone know of an example project with a USB device implemented
> with rtems-libbsd? 

I played around with it about 2 years ago for some hours. But I didn't
invest enough time into it to get it running. For implementing a USB
device it is most likely necessary to import the usb_template system
from FreeBSD. See the top two commits on this branch for the work I did
back then:

  https://gitlab.com/c-mauderer/rtems-libbsd/commits/20170707-cdce

Note that since then the structure of libbsd changed a bit
(libbsd_waf.py was removed). So these patches won't work directly on the
most current libbsd.

With these patches I was at least able to have some first live signs
between host and (in this case) a Beagle Bone Black board. I then
stopped that (hobby) work because something other more interesting
interrupted.

> 
> I have built rtems-libbsd for the realview_pbx_a9_qemu and for the
> altcycv_devkit. The USB examples in the testsuite all appear to be USB
> host-mode tests. What I want to do is to create a system that will
> present a USB composite device that I can connect to a USB host. The
> composite device is to have a USB bulk IN endpoint, a USB bulk OUT
> endpoint and a USB HID IN endpoint. I'm trying to find out whether I can
> do this on RTEMS. I have all the relevant USB descriptors from my
> implementation that uses USB gadgets on Linux. I want to port the
> application to an RTOS.

With the current state of the libbsd it might would be easier for you to
find out whether it works with FreeBSD. As soon as it is clear how it
works there it is only a small step to port the necessary parts to RTEMS
via libbsd.

> 
> Thanks,
> 
> Tony
> 
> 
> Confidentiality Notice: 
> 
> The information contained in this message, including any attachments
> hereto, may be confidential and is intended to be read only by the
> individual or entity to whom this message is addressed. If the reader of
> this message is not the intended recipient or an agent or designee of
> the intended recipient, please note that any review, use, disclosure or
> distribution of this message or its attachments, in any form, is
> strictly prohibited. If you have received this message in error, please
> immediately notify the sender and/or Rapt Touch Ltd via email
> at info at rapttouch.com <mailto:info at rapttouch.com> and delete or destroy
> any copy of this message and its attachments.

PS: Note that a confidentiality Notice on a public mailing list is quite
pointless. See the Mailing list policies regarding that too:
https://devel.rtems.org/wiki/RTEMSMailingLists

Best regards

Christian


More information about the users mailing list