I'm wondering what approaches there is for updating/flashing firmware for a XMOS USB Audio device, without using a XTAG or other external tool.
For windows and OSX it seems the "DFU Loader" does the job, but Linux?
Thanks
Senthil
DFU loader for XMOS USB AUDIO - Linux?
-
- Active Member
- Posts: 46
- Joined: Tue Nov 02, 2010 4:53 pm
-
- Junior Member
- Posts: 4
- Joined: Tue Jul 12, 2016 2:16 am
308 views but no replies; seems there's interest in this.
+1 !!
+1 !!
-
- Member++
- Posts: 17
- Joined: Tue Nov 01, 2016 2:06 am
Read the design_guide,
Macro :DFU
Description :Enable DFU functionality.
A driver required for Windows operation.
Default: 1 (Enabled)
,Maybe Linux doesn't need ?
Macro :DFU
Description :Enable DFU functionality.
A driver required for Windows operation.
Default: 1 (Enabled)
,Maybe Linux doesn't need ?
-
- Junior Member
- Posts: 4
- Joined: Tue Jul 12, 2016 2:16 am
Reading the build instructions for OSX:
https://www.xmos.com/support/boards?ver ... 441&page=4
Would it simply be a case of changing the Makefile flags to suit *nix?
https://www.xmos.com/support/boards?ver ... 441&page=4
Would it simply be a case of changing the Makefile flags to suit *nix?
-
- XCore Addict
- Posts: 185
- Joined: Tue Mar 26, 2013 12:10 pm
A kind customer has shared these instructions with me, to explain how they got this running under Ubuntu 17.04.
1. Install usblib:
sudo apt-get install libusb-1.0-0-dev
2. Tweak headers in ‘xmosdfu.cpp’ :
#include <libusb-1.0/libusb.h>
3. Build:
g++ -g -o xmosdfu xmosdfu.cpp `pkg-config --libs --cflags libusb-1.0`
Needs root privileges to run.
Best regards,
John
1. Install usblib:
sudo apt-get install libusb-1.0-0-dev
2. Tweak headers in ‘xmosdfu.cpp’ :
#include <libusb-1.0/libusb.h>
3. Build:
g++ -g -o xmosdfu xmosdfu.cpp `pkg-config --libs --cflags libusb-1.0`
Needs root privileges to run.
Best regards,
John
-
- Junior Member
- Posts: 5
- Joined: Thu Aug 05, 2021 4:35 pm
To save anyone a headache, the DFU loader compiles under Ubuntu 20.0.4 with these modifications, but produces unexpected results. Observations:johned wrote: ↑Tue Oct 10, 2017 11:24 am A kind customer has shared these instructions with me, to explain how they got this running under Ubuntu 17.04.
1. Install usblib:
sudo apt-get install libusb-1.0-0-dev
2. Tweak headers in ‘xmosdfu.cpp’ :
#include <libusb-1.0/libusb.h>
3. Build:
g++ -g -o xmosdfu xmosdfu.cpp `pkg-config --libs --cflags libusb-1.0`
Needs root privileges to run.
Best regards,
John
'xmosdfu --listdevices' works
'xmosdfu --download...' returns the error "Could not find/open device", despite the VID/PID appearing correctly in the list and the same code running fine under macOS. I've attempted to read through xmosdfu.cpp and see this error is thrown by:
Code: Select all
if (libusb_open(dev, &devh) < 0)
{
return -1;
}
I'll update if/when we manage to resolve.
EDIT: The fix was super simple. The --download command requires `sudo` privileges, wheras the --listdevices command does not! Permissions work differently in macOS...
-
- Junior Member
- Posts: 5
- Joined: Thu Aug 05, 2021 4:35 pm
To accommodate both Mac and Linux systems, replace the libusb include as follows. Tested under Ubuntu 20.0.4 and macOS Big Sur:
#ifdef __linux #include <libusb-1.0/libusb.h> #endif #ifdef __APPLE__ #include "libusb.h" #endif