Getting started with example libraries

New to XMOS and XCore? Get started here.
tstone96
Newbie
Posts: 1
Joined: Wed Feb 28, 2024 5:51 pm

Getting started with example libraries

Post by tstone96 »

I am fairly new to development with XMOS and specifically building the example code with the XTC tools and makefiles.
I am a hardware engineer and come from the world of STM32s where I have done everything in the ST IDE where you can hit 1 button to build and debug firmware and youre away. Im struggling to build the sw_usb_audio examples for the XU316 using the XTC tools.

I have already followed the examples here (https://www.xmos.com/documentation/XM-0 ... -tile.html) and I'm able to build and run a simple hello world program that runs on multiple tiles, but I cant find any good guidance on how to move from that to building and running the more complicated examples and im at a loss at where to start. Is there any documentation on this? I cant seem to find anything relevant in the whole XTC Tools guide.

Thanks in advance.


Audma_lm
Junior Member
Posts: 4
Joined: Thu Oct 05, 2023 3:14 pm

Post by Audma_lm »

Hi tstone96,

not an expert here but I can give some advice.
XMOS had his own IDE (xTIME Composer Studio) but this is not supported anymore, nevertheless someone in this forum was able to configure the xTIME Composer Studio to run the new XTC Tools v15, you can try to find the right post and follow that way.
XMOS provides the documentation to configure an IDE (e.g. vscode) with XTC Tools: https://www.xmos.com/documentation/XM-0 ... index.html

If your target is just to build and run the sw_usb_audio for XU316:
- Clone the repo https://github.com/xmos/sw_usb_audio/tr ... _evk_xu316
- Run XTC Tools v15 and move to your project directory
- Build command:

Code: Select all

xmake --makefile=Makefile CONFIG=2AMi10o10xxsxxx
- Flash command:

Code: Select all

xflash bin/1AMi2o2xxxxxx/app_usb_aud_xk_316_mc_2AMi10o10xxsxxx.xe


NOTE: The CONFIG parameter can be changed according to your requirements as described in https://github.com/xmos/sw_usb_audio/bl ... 6/Makefile

Code: Select all

# Build config naming scheme:

# Audio Class:  1 or 2
# Sync Mode     A(sync), S(ync) or (a)D(aptive)
# I2S           M(aster), S(lave) or X (I2S disabled)
# Input         enabled: i (channelcount)
# Output        enabled: o (channelcount)
# MIDI          enabled: m, disabled: x
# SPDIF in      enabled: s, disabled: x
# SPDIF out     enabled: s, disabled: x
# ADAT in       enabled: a, disabled: x
# ADAT out      enabled: a, disabled: x
# DSD out       enabled: d, disabled: x
# e.g. 2AMi10o10xxsxxx: Audio class 2.0, Asynchronous, I2S Master, input and output enabled (10 channels each), no MIDI, SPDIF output, no SPDIF input, no ADAT
Hope this help.

Regards.