summaryrefslogtreecommitdiff
path: root/download.tcl
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-03-13 16:51:03 -0700
committerJulian Blake Kongslie2022-03-13 16:51:03 -0700
commitf747a526b97b29a0479c62c4ecea285f1f5f2fde (patch)
tree7c389b4b62a97f8d0fa87c14f1682ea858c6ae94 /download.tcl
parentAdd memory arbiter and broadcast in between command UART and DRAM. (diff)
downloadmultipdp8-f747a526b97b29a0479c62c4ecea285f1f5f2fde.tar.xz
Change command parser to support bulk download script.
Diffstat (limited to 'download.tcl')
-rwxr-xr-xdownload.tcl28
1 files changed, 28 insertions, 0 deletions
diff --git a/download.tcl b/download.tcl
new file mode 100755
index 0000000..2e64865
--- /dev/null
+++ b/download.tcl
@@ -0,0 +1,28 @@
1#!/usr/bin/env expect
2
3set core 0
4
5if {$::argc > 0} {
6 set core [lindex $::argv 0]
7}
8
9spawn nios2-terminal --instance 0
10expect -ex "connected to hardware target"
11
12send "@[format %x [expr $core * 32768]]\n"
13
14while {[gets stdin line] >= 0} {
15 send "$line\n"
16 expect -ex "$line"
17}
18
19# It's likely we ended with a very large zero-memory operation. We want to see
20# two command bytes echoed back to us in order to guarantee that the zero
21# operation has completely flushed to memory.
22send "?"
23expect -ex "?"
24send "?"
25expect -ex "?"
26
27send "\004"
28expect -ex "exiting due to ^D on remote"