From 643461080317191cd3897527ad39a716d4e9d64c Mon Sep 17 00:00:00 2001 From: Perry Hung Date: Fri, 28 May 2010 05:24:21 -0400 Subject: Moved reset script to support directory For kicks. --- Makefile | 4 ++-- reset.py | 22 ---------------------- support/scripts/reset.py | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 24 deletions(-) delete mode 100755 reset.py create mode 100755 support/scripts/reset.py diff --git a/Makefile b/Makefile index ca6e70c..3917e35 100644 --- a/Makefile +++ b/Makefile @@ -196,12 +196,12 @@ jtag: $(BUILD_PATH)/main.bin @echo "JTAG build" program_ram: ram - ./reset.py + support/scripts/reset.py sleep 1 $(DFU) -a0 -d $(VENDOR_ID):$(PRODUCT_ID) -D build/main.bin -R program_flash: flash - ./reset.py + support/scripts/reset.py sleep 1 $(DFU) -a1 -d $(VENDOR_ID):$(PRODUCT_ID) -D build/main.bin -R diff --git a/reset.py b/reset.py deleted file mode 100755 index e4d0e99..0000000 --- a/reset.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/python - -import serial -import os - -try: - ser = serial.Serial('/dev/maple', baudrate=115200) - ser.open() - - # pull dtr and rts low - ser.setRTS(0) - ser.setDTR(0) - - # toggle DTR - ser.setDTR(1) - - # close - ser.close() - -except: - print "Failed to open the serial port for reset, perhaps this is your first upload or the board was already in bootloader mode" - diff --git a/support/scripts/reset.py b/support/scripts/reset.py new file mode 100755 index 0000000..e4d0e99 --- /dev/null +++ b/support/scripts/reset.py @@ -0,0 +1,22 @@ +#!/usr/bin/python + +import serial +import os + +try: + ser = serial.Serial('/dev/maple', baudrate=115200) + ser.open() + + # pull dtr and rts low + ser.setRTS(0) + ser.setDTR(0) + + # toggle DTR + ser.setDTR(1) + + # close + ser.close() + +except: + print "Failed to open the serial port for reset, perhaps this is your first upload or the board was already in bootloader mode" + -- cgit v1.2.3