From d5ecb005e4b71786e63f03cb819a358b6bf0219c Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 20 Mar 2022 17:25:39 -0700 Subject: Support loading RIMs and multi-word lines via the UART loader. --- download.tcl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'download.tcl') diff --git a/download.tcl b/download.tcl index 2e64865..31d4c82 100755 --- a/download.tcl +++ b/download.tcl @@ -1,15 +1,19 @@ #!/usr/bin/env expect set core 0 +set wordsperline 1 -if {$::argc > 0} { +if {$::argc > 1} { + set core [lindex $::argv 0] + set wordsperline [lindex $::argv 1] +} elseif {$::argc > 0} { set core [lindex $::argv 0] } spawn nios2-terminal --instance 0 expect -ex "connected to hardware target" -send "@[format %x [expr $core * 32768]]\n" +send "@[format %x [expr $core * 32768 / $wordsperline]]\n" while {[gets stdin line] >= 0} { send "$line\n" -- cgit v1.2.3