aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rwxr-xr-xsupport/scripts/reset.py22
1 files changed, 22 insertions, 0 deletions
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"
+