summaryrefslogtreecommitdiff
path: root/download.tcl
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-05-08 15:51:35 -0700
committerJulian Blake Kongslie2022-05-08 15:51:35 -0700
commit38c5ae5b60eae9562b97da42f47af3861847f8e5 (patch)
tree556fd9e5c38fb2feea56ce5741ca02a5e110ad63 /download.tcl
parentMake the script for setting up the TTY actually connect. (diff)
downloadmultipdp8-38c5ae5b60eae9562b97da42f47af3861847f8e5.tar.xz
*Proper* serial port for memory downloads. 115200 8O2 RS232 with CRTRTS.
Diffstat (limited to 'download.tcl')
-rwxr-xr-xdownload.tcl34
1 files changed, 0 insertions, 34 deletions
diff --git a/download.tcl b/download.tcl
deleted file mode 100755
index 635e54b..0000000
--- a/download.tcl
+++ /dev/null
@@ -1,34 +0,0 @@
1#!/usr/bin/env expect
2
3set timeout 3600
4
5set core 0
6set wordsperline 1
7
8if {$::argc > 1} {
9 set core [lindex $::argv 0]
10 set wordsperline [lindex $::argv 1]
11} elseif {$::argc > 0} {
12 set core [lindex $::argv 0]
13}
14
15spawn nios2-terminal --instance 0
16expect -ex "connected to hardware target"
17
18send "@[format %x [expr $core * 32768 / $wordsperline]]\n"
19
20while {[gets stdin line] >= 0} {
21 send "$line\n"
22 expect -ex "$line"
23}
24
25# It's likely we ended with a very large zero-memory operation. We want to see
26# two command bytes echoed back to us in order to guarantee that the zero
27# operation has completely flushed to memory.
28send "?"
29expect -ex "?"
30send "?"
31expect -ex "?"
32
33send "\004"
34expect -ex "exiting due to ^D on remote"