xmake

Technical questions regarding the XTC tools and programming with XMOS.
czabel
Junior Member
Posts: 4
Joined: Tue Sep 26, 2017 11:35 pm

xmake

Post by czabel »

I've got the XK-AUDIO-316-MC-AB board, hoping to use it as a simple 8 channel USB sound card. I am doing all of this work on a Windows 10 PC.

I'm following the guide, currently on the "Building the Firmware" step: https://www.xmos.com/documentation/XM-0 ... e-firmware.

I've worked my way through various cmake errors, editing the CMakeLists.txt a few times to sort out missing paths, and have managed to build everything correctly. (I think).
This was the

Code: Select all

cmake -G "Unix Makefiles" -B build
command.

NExt up is to run

Code: Select all

xmake -C build
but this fails. I have looked around on the forums and was pointed to this "Build Configurations" page on GitHub, which specifies I can target a specific build, but this command:

Code: Select all

xmake -C build 1AMi8o8xxxxxxx
also fails, with the same error. The output of this command is below:

Code: Select all

-- Configuring application: app_usb_aud_xk_316_mc
C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/src/core/xk-audio-316-mc.xn:13 Error: XN11099 Package type "XS3-UnA-1024-TQ128" cannot be resolved to a package file.
-- Found build configs:
-- 1AMi8o8xxxxxx
-- 1SMi2o2xxxxxx
-- 2AMi10o10xssxxx
-- 2AMi16o16xxxaax
-- 2AMi18o18mssaax
-- 2AMi8o8mxxxxx
-- 2AMi8o8xxxxxx
-- 2AMi8o8xxxxxx_mix8
-- 2AMi8o8xxxxxx_tdm8
-- 2ASi8o8xxxxxx_tdm8
-- 2SMi8o8xxxxxx
-- 2SSi8o8xxxxxx
-- Adding dependency lib_xua
-- Adding dependency lib_adat
-- Adding dependency lib_locks
-- Adding dependency lib_logging
-- Adding dependency lib_spdif
-- Adding dependency lib_sw_pll
-- Adding dependency lib_xassert
-- Adding dependency lib_mic_array
-- Adding dependency lib_xcore_math
-- Adding dependency lib_xud
-- Adding dependency lib_i2c
-- Adding dependency lib_i2s
-- Adding dependency lib_board_support
-- Generating commands for Pre-Compilation Analysis (PCA)
-- Configuring done (2.1s)
-- Generating done (1.1s)
-- Build files have been written to: C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/build
xmake[1]: Entering directory `C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/build'
xmake[2]: Entering directory `C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/build'
[  0%] Generating C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/.build_1AMi8o8xxxxxx/src/extensions/hostactive.xc.pca.xml
C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/src/core/xk-audio-316-mc.xn:13 Error: XN11099 Package type "XS3-UnA-1024-TQ128" cannot be resolved to a package file.
xmake[2]: *** [C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/.build_1AMi8o8xxxxxx/src/extensions/hostactive.xc.pca.xml] Error 1
xmake[2]: Leaving directory `C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/build'
xmake[1]: *** [CMakeFiles/app_usb_aud_xk_316_mc_1AMi8o8xxxxxx.dir/all] Error 2
xmake[1]: Leaving directory `C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/build'
xmake: *** [all] Error 2
xmake: Leaving directory `C:/Users/czabel/Desktop/SpinalTap/firmware/sw_usb_audio/app_usb_aud_xk_316_mc/build'
Looking in the XTC /targets directory, I also can't see any "XS3-" directories or files, did my install somehow fail?

What am I missing/doing wrong here? Thank you to anyone who can help.
Joe
Verified
Experienced Member
Posts: 98
Joined: Sun Dec 13, 2009 1:12 am

Post by Joe »

Think you need to be on Tools 15.3.0. Suspect you're on an older version.

Cheers,
Joe
XMOS hardware grey beard.
czabel
Junior Member
Posts: 4
Joined: Tue Sep 26, 2017 11:35 pm

Post by czabel »

Thanks for the thought Joe, but I am on 15.3.1 (just downloaded it a few days ago).

I've also tried it just now (15.3.1 downloaded today) on a Macbook and am seeing the same package error, along with a new one about a specific configuration I added to CMakeLists.txt - perhaps this isn't allowed?

Code: Select all

:app_usb_aud_xk_316_mc aelab$ /Applications/XMOS_XTC_15.3.1/bin/xmake -C build
xmake: Entering directory `/Users/aelab/Desktop/XMOS_316_MC/sw_usb_audio-_sw_9_0_0/sw_usb_audio/app_usb_aud_xk_316_mc/build'
xmake[1]: Entering directory `/Users/aelab/Desktop/XMOS_316_MC/sw_usb_audio-_sw_9_0_0/sw_usb_audio/app_usb_aud_xk_316_mc/build'
xmake[2]: Entering directory `/Users/aelab/Desktop/XMOS_316_MC/sw_usb_audio-_sw_9_0_0/sw_usb_audio/app_usb_aud_xk_316_mc/build'
[  0%] Generating /Users/aelab/Desktop/XMOS_316_MC/sw_usb_audio-_sw_9_0_0/sw_usb_audio/app_usb_aud_xk_316_mc/.build_1AMi8o8xxxxxx/src/extensions/hostactive.xc.pca.xml
/Users/aelab/Desktop/XMOS_316_MC/sw_usb_audio-_sw_9_0_0/sw_usb_audio/app_usb_aud_xk_316_mc/src/core/xk-audio-316-mc.xn:13 Error: XN11099 Package type "XS3-UnA-1024-TQ128" cannot be resolved to a package file.
xmake[2]: *** [/Users/aelab/Desktop/XMOS_316_MC/sw_usb_audio-_sw_9_0_0/sw_usb_audio/app_usb_aud_xk_316_mc/.build_1AMi8o8xxxxxx/src/extensions/hostactive.xc.pca.xml] Error 1
xmake[2]: Leaving directory `/Users/aelab/Desktop/XMOS_316_MC/sw_usb_audio-_sw_9_0_0/sw_usb_audio/app_usb_aud_xk_316_mc/build'
xmake[1]: *** [CMakeFiles/app_usb_aud_xk_316_mc_1AMi8o8xxxxxx.dir/all] Error 2
xmake[1]: Leaving directory `/Users/aelab/Desktop/XMOS_316_MC/sw_usb_audio-_sw_9_0_0/sw_usb_audio/app_usb_aud_xk_316_mc/build'
xmake: *** [all] Error 2
xmake: Leaving directory `/Users/aelab/Desktop/XMOS_316_MC/sw_usb_audio-_sw_9_0_0/sw_usb_audio/app_usb_aud_xk_316_mc/build'
CiaranW
Verified
Member
Posts: 9
Joined: Tue Jun 28, 2022 10:58 am

Post by CiaranW »

Hi,

Have you used the 'SetEnv.command' script to configure the XTC tools environment? https://www.xmos.com/documentation/XM-0 ... arted.html

It configures a collection of environment variables so that the XTC tools can find things like the package files.

Cheers,
Ciaran
czabel
Junior Member
Posts: 4
Joined: Tue Sep 26, 2017 11:35 pm

Post by czabel »

Progress! Thank you for holding my hand, I should've read beyond 'Install the Tools.' :s

So now I've built the firmwares (including the one I added), but they don't behave as expected as devices.

First, I added a configuration to the CMakeLists.txt file:

Code: Select all

set(APP_COMPILER_FLAGS_1AMi8o8xxxxxx ${SW_USB_AUDIO_FLAGS} -DAUDIO_CLASS=1)
And it appears to have worked, I at least have an .xe file that matches that name, and the

Code: Select all

xmake -C build
command gave me no errors. I then flash it using

Code: Select all

xflash path/name/here.xe
and that also appears to succeed. However, when I go to configure the channels, it only enumerates as a two channel device, despite the 8 channel count that I thought I assigned. Did I do something wrong here? Is UAC1 just hard limited to stereo? I'm finding it very frustrating to try and answer that question via searching the web...
See the below screenshot for the Windows interface that *should* allow you to set multichannel configurations, if available:
uac1_channelConfig.png

Second issue is regarding the 'standard' set of firmwares that already existed in the CMakeLists.txt file. Specifically: 2AMi8o8xxxxxx and 2SMi8o8xxxxxx. Both built and flashed successfully, and the device enumerates as a UAC2.0 device, but I get even less functionality:
uac2_channelConfig.png

Realistically, if someone were to make a UAC1.0 flavor that had 8 channels out, I'd be sorted. I don't plan to do any real 'development' work on this platform, I was just hoping to use this as a high quality multichannel sound card.
You do not have the required permissions to view the files attached to this post.