Add xmosdfu Raspberry Pi makefile and rename directory from "xmos_dfu_osx" to "xmosdfu"

This commit is contained in:
Larry Snizek
2017-10-05 17:56:26 +01:00
parent 7410ff5485
commit a25d8a64b4
12 changed files with 1244 additions and 58 deletions

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++ -g -o xmosdfu xmosdfu.cpp -Ilibusb/OSX libusb/OSX/libusb-1.0.0.dylib -m32

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 xmosdfu.cpp

File diff suppressed because it is too large Load Diff