From 3f708bda562f30f3cd754efe10b495a35f303766 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 5 Jun 2022 13:21:18 -0700 Subject: More reliable download script. --- tool/download.tcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tool/download.tcl') diff --git a/tool/download.tcl b/tool/download.tcl index 96fc03b..596e527 100755 --- a/tool/download.tcl +++ b/tool/download.tcl @@ -26,10 +26,10 @@ while {[gets stdin line] >= 0} { # It's likely we ended with a very large zero-memory operation. We want to see # two command bytes echoed back to us in order to guarantee that the zero # operation has completely flushed to memory. -send "?" -expect -ex "?" -send "?" -expect -ex "?" +# Note that this forces the last line of memory to be zero. +set atline "@[format %x [expr ($core * 32768 + 32767) / $wordsperline]]" +send "$atline =0 $atline ?" +expect -ex "$atline =0 $atline ?0000\r\n" send "\n~." wait -- cgit v1.2.3