forked from PAWPAW-Mirror/lib_xua
Add xmosdfu Raspberry Pi makefile and rename directory from "xmos_dfu_osx" to "xmosdfu"
This commit is contained in:
@@ -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.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
|
||||||
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 xmosdfu.cpp
|
||||||
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
0
module_dfu/host/xmos_dfu_osx/xmosdfu.cpp → module_dfu/host/xmosdfu/xmosdfu.cpp
Executable file → Normal file
0
module_dfu/host/xmos_dfu_osx/xmosdfu.cpp → module_dfu/host/xmosdfu/xmosdfu.cpp
Executable file → Normal file
Reference in New Issue
Block a user