Merge branch 'master' of github.com:xmos/sc_usb_audio

This commit is contained in:
Larry Snizek
2017-10-06 17:44:57 +01:00
18 changed files with 3725 additions and 64 deletions

4
.gitignore vendored
View File

@@ -1,6 +1,6 @@
*.log
xmosdfu
xmosdfu.*
module_dfu/host/xmosdfu/xmosdfu
*.dSYM
*/.build_*/*
*/bin/*
*.o

View File

@@ -1,6 +1,11 @@
sc_usb_audio Change Log
=======================
7.5.1
-----
- ADDED: Linux Makefile for xmosdfu host application
- ADDED: Raspberry Pi Makefile for xmosdfu host application
7.4.1
-----
- RESOLVED: Exception due to null chanend when using NO_USB
@@ -13,7 +18,7 @@ sc_usb_audio Change Log
7.3.0
-----
- CHANGE: Example OSX DFU host app updated to now can PID as runtime
- CHANGE: Example OSX DFU host app updated to now take PID as runtime
argument. This enabled multiple XMOS devices to be attached to the host
during DFU process

View File

@@ -1 +1 @@
SOURCE_INCLUDE_DIRS=../host/xmos_dfu_osx
SOURCE_INCLUDE_DIRS=../host/xmosdfu

View File

@@ -1,2 +0,0 @@
all:
g++ -g -o xmosdfu xmosdfu.cpp -I. -IOSX libusb-1.0.0.dylib -m32

View File

@@ -1,9 +0,0 @@
#! /bin/bash
#find out were we are running from so we only exec this program
PROGDIR=`dirname $0`
#setup environment
export DYLD_LIBRARY_PATH=$PROGDIR:$DYLD_LIBRARY_PATH
$PROGDIR/xmosdfu $1 $2 $3

View File

@@ -1 +0,0 @@
export DYLD_LIBRARY_PATH=$PWD:$DYLD_LIBRARY_PATH

View File

@@ -1,45 +0,0 @@
#! /bin/bash
################################################################################
#find out were we are running from so we only exec this programs
PROGDIR=`dirname $0`
#setup environment
export DYLD_LIBRARY_PATH=$PWD:$DYLD_LIBRARY_PATH
#check if we were given a binary name, otherwise use the default one
updatebin=testbin
if [ "$1" != "" ]; then
updatebin=$1
fi
#basic check for binary
if [ ! -f $updatebin ]; then
echo "FATAL: can't find update binary named $updatebin"
exit 1
else
using $updatebin
fi
#-------------------------------------------------------------------------------
for i in 1 2 3 4 5 6 7 8 9 10; do
echo ""
echo DFU test iteration $i
echo ---------------------
echo ""
echo "*** DFU revert to factory ***"
$PROGDIR/xmosdfu --revertfactory
sleep 2
echo ""
echo "*** DFU download new firmware ***"
$PROGDIR/xmosdfu --download $updatebin
sleep 2
echo ""
echo "*** DFU upload existing firmware ***"
$PROGDIR/xmosdfu --upload $updatebin
sleep 2
echo ""
done
echo DFU Test Complete!

View File

@@ -0,0 +1,2 @@
all:
g++ -m32 -Wall -g -o xmosdfu xmosdfu.cpp -Ilibusb/Linux32 -lusb-1.0

View File

@@ -0,0 +1,2 @@
all:
g++ -Wall -g -o xmosdfu xmosdfu.cpp -Ilibusb/Linux32 -lusb-1.0

View File

@@ -0,0 +1,2 @@
all:
g++ -g -o xmosdfu xmosdfu.cpp -Ilibusb/OSX libusb/OSX/libusb-1.0.0.dylib -m32 -Wall

View File

@@ -0,0 +1,8 @@
# Requires libusb, you can install with:
# apt-get install libusb-1.0-0-dev
#
# Either run as administrator (sudo) or add a udev rule for the correct
# vendor and product IDs
xmosdfu: xmosdfu.cpp
g++ -D_GNU_SOURCE -Wall -g -o xmosdfu -Ilibusb/Rasp -lusb-1.0 -x c xmosdfu.cpp -std=c99

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -86,7 +86,7 @@ static int find_xmos_device(unsigned int id, unsigned int pid, unsigned int list
}
else
{
libusb_config_descriptor *config_desc = NULL;
struct libusb_config_descriptor *config_desc = NULL;
libusb_get_active_config_descriptor(dev, &config_desc);
if (config_desc != NULL)
{
@@ -94,7 +94,7 @@ static int find_xmos_device(unsigned int id, unsigned int pid, unsigned int list
for (int j = 0; j < config_desc->bNumInterfaces; j++)
{
//printf("%d\n", j);
const libusb_interface_descriptor *inter_desc = ((libusb_interface *)&config_desc->interface[j])->altsetting;
const struct libusb_interface_descriptor *inter_desc = ((struct libusb_interface *)&config_desc->interface[j])->altsetting;
if (inter_desc->bInterfaceClass == 0xFE && inter_desc->bInterfaceSubClass == 0x1)
{
XMOS_DFU_IF = j;
@@ -563,5 +563,5 @@ int main(int argc, char **argv)
libusb_close(devh);
libusb_exit(NULL);
return true;
return 1;
}