Quick start#
Warning
XMOS development boards are typically supplied with no firmware pre-programmed.
The following steps explain how to programmed the latest firmware on the board and use it. Each step is explained in detail in the following sections.
Download the latest USB Audio 2.0 Device software release from the XMOS website USB & Multichannel Audio page, using the DOWNLOAD SOFTWARE link.
Before downloading the software, review the licence and click Accept to initiate the download.
(Section USB Audio 2.0 reference software.)
If using a Windows host computer, download the USB Audio Class 2.0 Evaluation Driver for Windows.
On the XMOS website USB & Multichannel Audio page, follow the DRIVER SUPPORT link, and click on Download. Once downloaded, run the executable and install the driver.
(Section USB Audio Class 2.0 evaluation driver for Windows.)
Download and install the the XMOS XTC Tools
The minimum required XTC Tools version for compiling USB Audio applications can be found in the README. Make sure to download the correct version of the tools.
(Section XMOS XTC development tools)
Compile the firmware relavant to the available reference hardware platform .
(Section: Building the firmware)
Connect the board to the development system using (using the supplied xTAG if required), and program the firmware onto the board.
(Section Running the firmware)
Connect audio input and output devices, and play audio.
(Section Playing audio)
USB Audio 2.0 reference software#
The latest USB Audio 2.0 Reference Design software is available free of charge from XMOS.
When downloading the software for the first time, the user needs to register at http://www.xmos.com/.
To download the firmware:
On the XMOS website USB & Multichannel Audio page, follow the DOWNLOAD SOFTWARE link
Review the licence agreement and click Accept.
Download and save the software when prompted.
The software is distributed as a zip archive containing pre-compiled binaries and source code that can be built using the XMOS XTC Tools.
Alternatively, contact a local sales representative for further details:
USB Audio Class 2.0 evaluation driver for Windows#
Note
Since version 10.6.4, macOS natively supports USB Audio Class 2.0 – no driver install is required.
Note
Since version 10, release 1703, Windows natively supports USB Audio Class 2.0 – no driver install is required.
Earlier Window versions only provides support for USB Audio Class 1.0. To use a USB Audio Class 2.0 device under these Windows versions requires a third party driver.
Developers may also wish to use a third party driver for reasons including:
ASIO support
Advanced clocking options and controls
Improved latency
Native DSD (via ASIO)
Branding customisation and custom control panels
Large channel count devices
Etc
XMOS therefore provides a free Windows USB Audio driver for evaluation and prototyping and a path to a more feature-rich multichannel production driver from our partner Thesycon.
The evaluation driver is available from the XMOS website:
Further information about the evaluation and production drivers is available in the USB Audio Class 2.0 Windows Driver Overview document available on the website:
XMOS XTC development tools#
The XMOS XTC tools provide everything required to develop applications for xcore multicore microcontrollers and can be downloaded, free of charge, from XMOS XTC tools. Installation instructions can be found here. Be sure to pay attention to the section Installation of required third-party tools.
The XMOS XTC tools make it easy to define real-time tasks as a parallel system. They come with standards compliant C and C++ compilers, language libraries, simulator, symbolic debugger, and runtime instrumentation and trace libraries. Multicore support offers features for task based parallelism and communication, accurate timing and I/O, and safe memory management. All components work off the real-time multicore functionality, giving a fully integrated approach.
The XTC tools are required by anyone developing or deploying applications on an xcore processor. The tools include:
“Tile-level” toolchain (Compiler, assembler, etc)
System libraries
“Network-level” tools (Multi-tile mapper etc)
XSIM simulator
XGDB debugger
Deployment tools
The tools as delivered are to be used within a command line environment, though may also be integrated with VS Code graphical code editor.
Warning
USB Audio applications are compiled using the XCommon CMake build system. The minimum XTC tools version that supports XCommon CMake can be found in the README file. Ensure that the firmware is compiled using the correct XTC Tools version.
Building the firmware#
Note
For convenience the release zips provided from XMOS contain precompiled binary (xe) files.
From a command prompt with the XMOS tools available, follow these steps:
Unzip the package zip to a known location
From the relevant application directory (e.g.
app_usb_aud_xk_audio_316_mc
), execute the commands:cmake -G "Unix Makefiles" -B build xmake -C build
The above steps will configure and build all of the available and supported build configurations for the application.
The applications are compiled using XCommon CMake which is a CMake
based build system.
The primary configuration file for the application is the CMakeLists.txt. It is present in the application directory (e.g. app_usb_aud_xk_audio_316_mc
).
This file specifies build configs, sources, build options and dependencies.
Note
See Build system for more details.
Running the firmware#
Typically during development the developer wishes to program the device’s internal RAM with the application binary directly via JTAG and then execute this application.
To run one of the compiled binaries complete the following steps:
Connect the USB Audio board to the host computer.
- Connect the xTAG to the USB Audio board and connect it to the host machine on which the application binary is present via a separate USB cable.
note, some boards have integrated xTAGs.
Ensure any required external power jacks are connected
Finally, to run the binary on the target, execute a command similar to the following:
xrun path/to/binary.xe
The device should now present itself as a USB Audio Device on the connected host computer. It will continue to operate as a USB Audio Device until the target board is power cycled.
Writing the application binary to flash#
Optionally a binary can be programmed into the boot flash. To do this:
Connect the USB Audio board to the host computer.
Connect the xTAG to the USB Audio board and connect the it to the host machine on which the application binary is present via a separate USB cable
Ensure any required external power jacks are connected
From a command prompt with the XMOS tools available, run the following command:
xflash path/to/binary.xe
Once flashed the target device will reboot and execute the binary. Power cycling the target board will cause the device to reboot the flashed binary.
Playing audio#
Connect the board to any power supply provided (note, some boards will be USB bus powered)
Connect the board to a host with driver support for USB Audio Class using a USB cable
Install the Windows USB Audio 2.0 demonstration driver, if required.
Connect audio input/output devices to the connectors on the board e.g powered speakers
In the audio application, select the XMOS USB Audio device.
Start playing and recording.