forked from PAWPAW-Mirror/lib_xua
Merge branch 'master' of github.com:xmos/sc_usb_audio
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
*.log
|
*.log
|
||||||
xmosdfu
|
module_dfu/host/xmosdfu/xmosdfu
|
||||||
xmosdfu.*
|
*.dSYM
|
||||||
*/.build_*/*
|
*/.build_*/*
|
||||||
*/bin/*
|
*/bin/*
|
||||||
*.o
|
*.o
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
sc_usb_audio Change Log
|
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
|
7.4.1
|
||||||
-----
|
-----
|
||||||
- RESOLVED: Exception due to null chanend when using NO_USB
|
- RESOLVED: Exception due to null chanend when using NO_USB
|
||||||
@@ -13,7 +18,7 @@ sc_usb_audio Change Log
|
|||||||
|
|
||||||
7.3.0
|
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
|
argument. This enabled multiple XMOS devices to be attached to the host
|
||||||
during DFU process
|
during DFU process
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
SOURCE_INCLUDE_DIRS=../host/xmos_dfu_osx
|
SOURCE_INCLUDE_DIRS=../host/xmosdfu
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
all:
|
|
||||||
g++ -g -o xmosdfu xmosdfu.cpp -I. -IOSX libusb-1.0.0.dylib -m32
|
|
||||||
@@ -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
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export DYLD_LIBRARY_PATH=$PWD:$DYLD_LIBRARY_PATH
|
|
||||||
@@ -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!
|
|
||||||
|
|
||||||
2
module_dfu/host/xmosdfu/Makefile.Linux32
Normal file
2
module_dfu/host/xmosdfu/Makefile.Linux32
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
all:
|
||||||
|
g++ -m32 -Wall -g -o xmosdfu xmosdfu.cpp -Ilibusb/Linux32 -lusb-1.0
|
||||||
2
module_dfu/host/xmosdfu/Makefile.Linux64
Normal file
2
module_dfu/host/xmosdfu/Makefile.Linux64
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
all:
|
||||||
|
g++ -Wall -g -o xmosdfu xmosdfu.cpp -Ilibusb/Linux32 -lusb-1.0
|
||||||
2
module_dfu/host/xmosdfu/Makefile.OSX
Normal file
2
module_dfu/host/xmosdfu/Makefile.OSX
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
all:
|
||||||
|
g++ -g -o xmosdfu xmosdfu.cpp -Ilibusb/OSX libusb/OSX/libusb-1.0.0.dylib -m32 -Wall
|
||||||
8
module_dfu/host/xmosdfu/Makefile.Pi
Normal file
8
module_dfu/host/xmosdfu/Makefile.Pi
Normal 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
|
||||||
0
module_dfu/host/xmos_dfu_osx/libusb.h → module_dfu/host/xmosdfu/libusb/Linux32/libusb.h
Executable file → Normal file
0
module_dfu/host/xmos_dfu_osx/libusb.h → module_dfu/host/xmosdfu/libusb/Linux32/libusb.h
Executable file → Normal file
1233
module_dfu/host/xmosdfu/libusb/Linux64/libusb.h
Normal file
1233
module_dfu/host/xmosdfu/libusb/Linux64/libusb.h
Normal file
File diff suppressed because it is too large
Load Diff
1233
module_dfu/host/xmosdfu/libusb/OSX/libusb.h
Executable file
1233
module_dfu/host/xmosdfu/libusb/OSX/libusb.h
Executable file
File diff suppressed because it is too large
Load Diff
1233
module_dfu/host/xmosdfu/libusb/Rasp/libusb.h
Normal file
1233
module_dfu/host/xmosdfu/libusb/Rasp/libusb.h
Normal file
File diff suppressed because it is too large
Load Diff
6
module_dfu/host/xmos_dfu_osx/xmosdfu.cpp → module_dfu/host/xmosdfu/xmosdfu.cpp
Executable file → Normal file
6
module_dfu/host/xmos_dfu_osx/xmosdfu.cpp → module_dfu/host/xmosdfu/xmosdfu.cpp
Executable file → Normal file
@@ -86,7 +86,7 @@ static int find_xmos_device(unsigned int id, unsigned int pid, unsigned int list
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
libusb_config_descriptor *config_desc = NULL;
|
struct libusb_config_descriptor *config_desc = NULL;
|
||||||
libusb_get_active_config_descriptor(dev, &config_desc);
|
libusb_get_active_config_descriptor(dev, &config_desc);
|
||||||
if (config_desc != NULL)
|
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++)
|
for (int j = 0; j < config_desc->bNumInterfaces; j++)
|
||||||
{
|
{
|
||||||
//printf("%d\n", 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)
|
if (inter_desc->bInterfaceClass == 0xFE && inter_desc->bInterfaceSubClass == 0x1)
|
||||||
{
|
{
|
||||||
XMOS_DFU_IF = j;
|
XMOS_DFU_IF = j;
|
||||||
@@ -563,5 +563,5 @@ int main(int argc, char **argv)
|
|||||||
libusb_close(devh);
|
libusb_close(devh);
|
||||||
libusb_exit(NULL);
|
libusb_exit(NULL);
|
||||||
|
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user