Added dfu-util src as a sub module, also added compiled dfu-util files to tools/linux and added script to set udev rules, which I took from the old Maple IDE

This commit is contained in:
Roger Clark 2015-05-10 20:26:17 +10:00
parent 8c0004f573
commit f90929bfa8
9 changed files with 36 additions and 1 deletions

3
.gitmodules vendored
View File

@ -7,3 +7,6 @@
[submodule "tools/src/texane-stlink"]
path = tools/src/texane-stlink
url = https://github.com/texane/stlink
[submodule "tools/src/dfu-util"]
path = tools/src/dfu-util
url = https://gitorious.org/dfu-util/dfu-util.git

View File

@ -0,0 +1,5 @@
ATTRS{idProduct}=="1001", ATTRS{idVendor}=="0110", MODE="664", GROUP="plugdev"
ATTRS{idProduct}=="1002", ATTRS{idVendor}=="0110", MODE="664", GROUP="plugdev"
ATTRS{idProduct}=="0003", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple"
ATTRS{idProduct}=="0004", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple"

BIN
tools/linux/dfu-util/dfu-prefix Executable file

Binary file not shown.

BIN
tools/linux/dfu-util/dfu-suffix Executable file

Binary file not shown.

BIN
tools/linux/dfu-util/dfu-util Executable file

Binary file not shown.

View File

@ -0,0 +1,10 @@
#!/bin/sh
if sudo [ -w /etc/udev/rules.d ]; then
echo "Copying Maple-specific udev rules..."
sudo cp -v 45-maple.rules /etc/udev/rules.d/45-maple.rules
sudo chown root:root /etc/udev/rules.d/45-maple.rules
sudo chmod 644 /etc/udev/rules.d/45-maple.rules
else
echo "Couldn't copy to /etc/udev/rules.d/; you probably have to run this script as root? Or your distribution of Linux doesn't include udev; try running the IDE itself as root."
fi

View File

@ -8,10 +8,11 @@ if [ $# -lt 4 ]; then
fi
dummy_port=$1; altID=$2; usbID=$3; binfile=$4
#DFU_UTIL=$(dirname $0)/dfu-util/dfu-util
DFU_UTIL=/usr/bin/dfu-util
if [ ! -x ${DFU_UTIL} ]; then
echo "$0: error: cannot find ${DFU_UTIL}" >&2
exit 2
fi
${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile}
${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile}

15
tools/src/build_dfu-util.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
sudo apt-get build-dep dfu-util
sudo apt-get install build-essentials
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install autoconf automake autotools-dev
cd dfu-util
./autogen.sh
./configure
make
cp src/dfu-util ../../linux/dfu-util
cp src/dfu-suffix ../../linux/dfu-util
cp src/dfu-prefix ../../linux/dfu-util

1
tools/src/dfu-util Submodule

@ -0,0 +1 @@
Subproject commit 604de4b1b39a16dbd57da5786d85ebd734cec339