aboutsummaryrefslogtreecommitdiff
path: root/scripts/hexprog.py
diff options
context:
space:
mode:
authorGareth McMullin2011-11-12 13:47:50 +1300
committerGareth McMullin2011-11-12 13:47:50 +1300
commit6a6b52bf54ae2400634d69f4f0cc632592b40a96 (patch)
treec80cb48852a33572f786bd44916a9017fa959245 /scripts/hexprog.py
parent7b13bae8dcfbbbd5dc56eb9950aec93c96340cb7 (diff)
Fixed python scripts for programming target to work on 64-bit machines.
Diffstat (limited to 'scripts/hexprog.py')
-rwxr-xr-xscripts/hexprog.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/hexprog.py b/scripts/hexprog.py
index e82c918..128e55e 100755
--- a/scripts/hexprog.py
+++ b/scripts/hexprog.py
@@ -101,7 +101,13 @@ if __name__ == "__main__":
exit(-1)
try:
- target = gdb.Target(Serial(dev, baud, timeout=3))
+ s = Serial(dev, baud, timeout=3)
+ s.setDTR(1)
+ while s.read(1024):
+ pass
+
+ target = gdb.Target(s)
+
except SerialException, e:
print("FATAL: Failed to open serial device!\n%s\n" % e[0])
exit(-1)