lib_xua import fault

Discussions about USB Audio on XMOS devices
lmariotti
Member++
Posts: 27
Joined: Mon Nov 21, 2022 5:38 pm

lib_xua import fault

Post by lmariotti »

I'm following AN01027 to run the USB audio software in my custom hardware.
  • The usb audio software that I'm using is: sw_usb_audio_7_3_1
  • I've added the lib_xua in makefile

    Code: Select all

    USED_MODULES = lib_gpio lib_i2c lib_i2s lib_logging lib_xua
Trying to compile before any software changes, trigger the import wizard that try to import the lib_xua library but it always fail as in attachments.
I downloaded the library from https://www.xmos.ai/libraries/ (v3.5.1) but when I try to import it manually into workspace the "import project wizard" reports: "Some projects cannot be imported because they already exist in the workspace"

I tried to take a step back and compile the app_usb_aud_xk_216_mc as it is by command line:

Code: Select all

C:\Users\Francesco\Desktop\digital_inputs\app_usb_aud_xk_216_mc>xmake --makefile=Makefile CONFIG=1AMi8o2xxxxxx
Checking build modules
Checking https://www.xmos.com for required libraries
ERROR: No compatible version found for lib_xua.
C:/Program Files (x86)/XMOS/XTC/15.2.1/build/xcommon/module_xcommon/build/../build/Makefile.common1:565: *** Missing build modules. Cannot continue.  Stop.
xmake: *** [check_module_deps] Error 2
What is the correct procedure to import this missing library?

//--------------------------------------------------------------------------------------------

EDIT: I've tryed to use sw_usb_audio_6_15_2, for some reasons I had to change all dfu includes to their absolute paths

Code: Select all

#include "../../module_dfu/src/dfu_types.h"
but apart from that it seems that no library is missing.
I'm getting now a compilation error:

Code: Select all

C:/Users/Francesco/Desktop/digital_inputs/module_usb_audio/main.xc: Error: Multiple definition of 'main.parinfo'
../src/main.xc: Error: first defined here
C:/Users/Francesco/Desktop/digital_inputs/module_usb_audio/main.xc: Error: Multiple definition of 'p_lrclk.info'
../src/main.xc: Error: first defined here
C:/Users/Francesco/Desktop/digital_inputs/module_usb_audio/main.xc: Error: Multiple definition of 'p_bclk.info'
../src/main.xc: Error: first defined here
C:/Users/Francesco/Desktop/digital_inputs/module_usb_audio/main.xc: Error: Multiple definition of '__main__main_tile_0.savedstate'
../src/main.xc: Error: first defined here
C:/Users/Francesco/Desktop/digital_inputs/module_usb_audio/main.xc: Error: Multiple definition of '__main__main_tile_0.nstackwords'
../src/main.xc: Error: first defined here
C:/Users/Francesco/Desktop/digital_inputs/module_usb_audio/main.xc: Error: Multiple definition of '__main__main_tile_0.maxcores'
../src/main.xc: Error: first defined here
C:/Users/Francesco/Desktop/digital_inputs/module_usb_audio/main.xc: Error: Multiple definition of '__main__main_tile_0.maxtimers'
../src/main.xc: Error: first defined here
C:/Users/Francesco/Desktop/digital_inputs/module_usb_audio/main.xc: Error: Multiple definition of '__main__main_tile_0.maxchanends'
../src/main.xc: Error: first defined here
C:/Users/Francesco/Desktop/digital_inputs/module_usb_audio/main.xc: Error: Multiple definition of '__main__main_tile_0'
../src/main.xc: Error: first defined here
You do not have the required permissions to view the files attached to this post.


MaximLiadov
XCore Addict
Posts: 130
Joined: Mon Apr 16, 2018 9:14 am

Post by MaximLiadov »

check_module_deps Error 2

In my opinion, you should check your library version dependencies and update old libraries if necessary.

To do this, open the module_build_info file in your imported library in Project Explorer.

Then find the line that looks something like this:

DEPENDENT_MODULES = lib_xassert(>=3.0.0) lib_logging(>=2.1.0)

Then just update these dependencies.
lmariotti
Member++
Posts: 27
Joined: Mon Nov 21, 2022 5:38 pm

Post by lmariotti »

I was trying to import the usb sw in my existing project but found out that it is really messy.
I had a fresh new start just building the app_usb_aud_xk_216_mc (not even imported it in xTIME Composer) and it builds just fine.
Now I'm trying to modifying it to run on xCORE-200 eXplorer with external MCLK and external DAC, no really good progress so far but keep going ahah
MaximLiadov
XCore Addict
Posts: 130
Joined: Mon Apr 16, 2018 9:14 am

Post by MaximLiadov »

Why do you need the xCORE-200 eXplorer for audio at all? Seems like a waste of time. Better to start with any audio board, but with audio XOs on the board. The xCORE-200 audio EVB is also not a good choice in 2023. It's too old and has been replaced by the modern XS3 family, I mean XU316 EVB. I recommend to buy the newest one. XS3 is much better from hardware point of view.
lmariotti
Member++
Posts: 27
Joined: Mon Nov 21, 2022 5:38 pm

Post by lmariotti »

We're running tests for a custom board with XU208, we already had an xCORE-200 eXplorer from the development of an old application, this allow us to use custom peripherals (ADC / DAC / OSC) just adding a bunch of wires, that's why we thought it would be a good starting point.
I hope to get the usb sw to work. So far the audio is almost good although slightly distorted, especially the left channel.

However, if I were to switch to the new XU316, is it possible to easily transfer the firmware from the XU316 to the XU208?

Thank you very much for your support, sorry for the many questions but I am a bit noob about xmos.
MaximLiadov
XCore Addict
Posts: 130
Joined: Mon Apr 16, 2018 9:14 am

Post by MaximLiadov »

You are welcome. In my opinion, XU208 is fine if you are very limited in EE cost (like your product MSRP $150-200) and don't plan to do anything but playback/record with the very minor changes in the source code. To get started and gain some experience, I suppose this is not a bad option. In 2023, I would definitely choose XU316 for a new audio project. But maybe it's just me and my experience.