diff options
| author | Julian Blake Kongslie | 2022-05-08 15:51:35 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-05-08 15:51:35 -0700 |
| commit | 38c5ae5b60eae9562b97da42f47af3861847f8e5 (patch) | |
| tree | 556fd9e5c38fb2feea56ce5741ca02a5e110ad63 /download.tcl | |
| parent | Make the script for setting up the TTY actually connect. (diff) | |
| download | multipdp8-38c5ae5b60eae9562b97da42f47af3861847f8e5.tar.xz | |
*Proper* serial port for memory downloads. 115200 8O2 RS232 with CRTRTS.
Diffstat (limited to 'download.tcl')
| -rwxr-xr-x | download.tcl | 34 |
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 | |||
| 3 | set timeout 3600 | ||
| 4 | |||
| 5 | set core 0 | ||
| 6 | set wordsperline 1 | ||
| 7 | |||
| 8 | if {$::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 | |||
| 15 | spawn nios2-terminal --instance 0 | ||
| 16 | expect -ex "connected to hardware target" | ||
| 17 | |||
| 18 | send "@[format %x [expr $core * 32768 / $wordsperline]]\n" | ||
| 19 | |||
| 20 | while {[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. | ||
| 28 | send "?" | ||
| 29 | expect -ex "?" | ||
| 30 | send "?" | ||
| 31 | expect -ex "?" | ||
| 32 | |||
| 33 | send "\004" | ||
| 34 | expect -ex "exiting due to ^D on remote" | ||
