using lib_xud and module_xud implement 2 usb issue

New to XMOS and XCore? Get started here.
Post Reply
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

using lib_xud and module_xud implement 2 usb issue

Post by TonyXiao »

Hi all

2 usb function are need for my project, and i am trying use lib_xud and module_xud .
for 1 usb function, both libraries can be used to realize the usb function.
for 2 usb function, that's to say each libray realize one usb.
of curse there are some prerequisite works, there are some same parts for the 2 libaries, so i changed the lib_xud, usb signals 、some variables、and some functions are renamed. when finish such works, the lib_xud still works on usb.
when i used them both, only the lib_xud usb function is ok, and always failed with module_xud.
i tried basing on 1 usb with module_xud, and add lib_xud step by step. first i just add lib_xud in workspace, compile ok, but usb function failed. it is strange, i just add the library.
and i found when i delete lib_xud in USED_MODULES of the makefile, and the module_xud usb function works.
USED_MODULES = module_xud module_usb_shared module_usb_device module_usb_audio module_usb_midi module_dfu module_locks

so lib_xud and module_xud can not work at the same time?


TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

solved.
the lib_xud is the child of module_xud, it shares most of the function and variable.
after rename the whole function and variables in lib_xud, now the two libary working together now.
User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

Glad you got it working. I think XMOS should have designed it to work simply by instantiating on the different tiles but I wonder if it's something simple -- like #define usb_tile etc -- that causes it to fail.
User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

Glad you got it working. I think XMOS should have designed it to work simply by instantiating on the different tiles but I wonder if it's something simple -- like #define usb_tile etc -- that causes it to fail.
Post Reply