04-23-2018 06:49 PM
I would like to create a linux usb gadget, similar to gadget zero, using 'ConfigFS and libusbg library' from user space.
I have googled and found out how to do it using 'scripts' from user space.
My question is:
how to create Gadget Zero using C++/C code from user space to create Gadget Zero?
If I would like to use 'default kernel gadget zero driver', how to write an application? which /dev node to open?
Thanks in advance.
05-02-2018 02:53 PM
Were you able to figure out on how to write an application in Petalinux using gadget zero driver?
I'm using a zedboard with "avent-digilent-zedboard-v2017.3-final.bsp" to build Petalinux kernel.
In the Xilinx Petalinux Boot, is see a module g_zero.ko. I assume this the the gadget zero. it was under
I have also tried the Zynq USB Device Driver link shown below, with not much success: "http://www.wiki.xilinx.com/Zynq+Linux+USB+Device+Driver#Peripheral%20Mode-Kernel%20Configuration"
I tried to modify a Petalinux created module to a "Linux Kernel Module - USB Device Driver 02" tutorial off of youtube. Even though module structure looks similar to Petalinux created Platform_driver structure, I got a whole bunch of compile errors.
I could not find any good Xilinx tutorial yet that describe how to use the the Petalinux USB supplied drivers nor how to make a USB driver that runs under Petalinux. Maybe we can put two heads together to figure this out.
08-16-2018 12:52 PM
I am sorry, I have not been to the forum recently.
I am not using Petalinux, but Git repo of linux-xilinx.
I use Buildroot to build the code.
Having said that:
I have modified and using gadget_zero driver's loopback implementation (not source/sink).
This Custom implementation doesn't do loopback anymore, but my requirement is to send data from our board to Host.
I am able to receive Host application Vendor specific commands through USB and send data to host.