You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/bash
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "Syntax: ./start.sh CPU"
|
|
exit 1;
|
|
fi
|
|
|
|
CPU=$1
|
|
|
|
echo "Polling for chip..."
|
|
while true; do
|
|
dfu-programmer $1 start
|
|
if [ $? -eq 0 ]; then
|
|
echo "Chip found. Started."
|
|
break;
|
|
fi
|
|
|
|
sleep 1
|
|
done
|
|
|
|
|