Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
pluto3/pluto3download
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
29 lines (23 sloc)
553 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# plutoIIIdownload :: download an rbf file to a Pluto-III fpga board | |
# | |
SERIAL=/dev/ttyUSB0 | |
if [ ! -f "$1" ] | |
then | |
echo "Usage: $(basename $0) filename.rbf" >&2 | |
exit 1 | |
fi | |
if [ ! -c "$SERIAL" ] | |
then | |
echo "$(basename $0): serial port $SERIAL does not exist." | |
exit 2 | |
fi | |
if [ ! -w "$SERIAL" ] | |
then | |
echo "$(basename $0): serial port $SERIAL is not writable." | |
exit 3 | |
fi | |
echo -n "Unconfiguring Pluto3 board and downloading $1 ... " | |
(stty 115200 raw cs8 -cstopb -parenb -ixon -crtscts 0<&1 ; sendbreak; cat "$1" ) > $SERIAL | |
echo "done." | |