Hello,
I have seen the project lib_xud v2.0.2 on github. The readme of the project says, that it merges the existing sc_xud and lib_usb and replaces them both. Should I use lib_xud v2.0.2 instead of the lib_usb v3.1.2 from xmos library directory for product development? Does lib_xud contain bug fixes and features, that lib_usb v3.1.2 does not contain? Is lib_usb not compatible to the new AI processors but lib_xud is?
Best regards
Dieter
Should I use libusb or libxud?
-
- XCore Addict
- Posts: 144
- Joined: Wed Jun 29, 2016 8:59 am
-
- Junior Member
- Posts: 5
- Joined: Sun Nov 01, 2020 10:26 pm
Yes, yes and yes. The only disadvantage is that lib_xud is not compatible to XS1 processors. The API is almost compatible.
(Just stumbled over your question. Switching fixed some bugs for me last December, including some performance issues.)
/Ralf
(Just stumbled over your question. Switching fixed some bugs for me last December, including some performance issues.)
/Ralf
-
- XCore Addict
- Posts: 144
- Joined: Wed Jun 29, 2016 8:59 am
Thanks for the info.
-
- XCore Addict
- Posts: 144
- Joined: Wed Jun 29, 2016 8:59 am
In the meantime, i have switched to libxud. I have only add one line to xud.h to be able to compile it with xcc 14.x.x:
I had to fix the includes. Also the functions differs a little bit, but that was easy to fix. I personally prefer the libusb implementation to the libxud one for the XUD_InitEp() function. But that's just my personal taste.
libusb has some experimental code that is not ported yet to libxud.
However, thumbs up for libxud!
Code: Select all
#define xcore_clock_t clock
libusb has some experimental code that is not ported yet to libxud.
However, thumbs up for libxud!
-
- XCore Addict
- Posts: 179
- Joined: Mon Apr 16, 2018 9:14 am
Please, test if DFU does work in your project with lib_xud 2.1.0?
I also implemented latest lib_xud 2.1.0 instead of old one. Everything works fine, USB works fine, but now I have a problem with a DFU updater. Seems to be XMOS cannot reboot to DFU mode for some reason and get stuck. If I reboot XMOS manually (inside a firmware with a button) DFU does work fine then. I had no such problem with lib_xud v.1.2, so I believe it's an issue with a new more advanced lib_xud version.
I also implemented latest lib_xud 2.1.0 instead of old one. Everything works fine, USB works fine, but now I have a problem with a DFU updater. Seems to be XMOS cannot reboot to DFU mode for some reason and get stuck. If I reboot XMOS manually (inside a firmware with a button) DFU does work fine then. I had no such problem with lib_xud v.1.2, so I believe it's an issue with a new more advanced lib_xud version.
Last edited by MaximLiadov on Sun Jan 30, 2022 3:28 pm, edited 1 time in total.
-
- XCore Addict
- Posts: 179
- Joined: Mon Apr 16, 2018 9:14 am
Many thanks to Ross Owen and all XMOS people for the lib_xud library. I like it very much. Great job!
-
- XCore Addict
- Posts: 144
- Joined: Wed Jun 29, 2016 8:59 am
Sorry, I have not used the DFU, yet. So I cannot share any experience.
-
- XCore Addict
- Posts: 179
- Joined: Mon Apr 16, 2018 9:14 am
That's pity. Thank you for your response anyway. Hope to see any clue from someone who uses lib_xud as a complete replacement.
-
- XCore Addict
- Posts: 179
- Joined: Mon Apr 16, 2018 9:14 am
I found the problem. It's reboot.xc that doesn't work correctly with new lib_xud.
We still need some definitions (that we have no more in xud.h) for compatibility with all current projects.
#ifndef XUD_X200_SERIES
#define XUD_X200_SERIES 4
#endif
#define XUD_SERIES_SUPPORT XUD_X200_SERIES
These defines affect on some part of sourcodes around the project. So lib_xud 1.2 worked fine, and lib_xud 2.1 doesn't work.
The solution is: either add old defines to xud.h or update old codes removing defines manually.
We still need some definitions (that we have no more in xud.h) for compatibility with all current projects.
#ifndef XUD_X200_SERIES
#define XUD_X200_SERIES 4
#endif
#define XUD_SERIES_SUPPORT XUD_X200_SERIES
These defines affect on some part of sourcodes around the project. So lib_xud 1.2 worked fine, and lib_xud 2.1 doesn't work.
The solution is: either add old defines to xud.h or update old codes removing defines manually.
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
No problem :)MaximLiadov wrote: ↑Sat Jan 29, 2022 6:21 pm Many thanks to Ross Owen and all XMOS people for the lib_xud library. I like it very much. Great job!
Please do use lib_xud, its has updates for xCORE.AI devices now.
Technical Director @ XMOS. Opinions expressed are my own