You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
326 B

  1. #!/bin/bash
  2. set -x
  3. BUILD_DIR=.
  4. TARGET=lets_split_rev2_adam.hex
  5. MCU=atmega32u4
  6. ls /dev/tty* > /tmp/1;
  7. echo "Reset your Pro Micro now";
  8. while [[ -z $USB ]]; do
  9. echo "."
  10. sleep 1;
  11. ls /dev/tty* > /tmp/2;
  12. USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`;
  13. done;
  14. avrdude -p $MCU -c avr109 -P $USB -U flash:w:$BUILD_DIR/$TARGET