URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/rtos/ecos-2.0/packages/hal/mips/ref4955/v2_0/misc
- from Rev 27 to Rev 174
- ↔ Reverse comparison
Rev 27 → Rev 174
/swap4.tcl
0,0 → 1,26
#!/bin/bash |
# restart using a Tcl shell \ |
exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ |
( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ |
done ; \ |
echo "swap4.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" |
|
proc filter { input_file output_file } { |
set input_fd [open $input_file "r"] |
set output_fd [open $output_file "w"] |
|
fconfigure $input_fd -translation binary |
fconfigure $output_fd -translation binary |
while { 1 } { |
set data [read $input_fd 4] |
if { [eof $input_fd] } { |
break |
} |
binary scan $data "i" var |
puts -nonewline $output_fd [binary format "I" $var] |
} |
close $input_fd |
close $output_fd |
} |
|
filter [lindex $argv 0] [lindex $argv 1] |
/slow_cat.tcl
0,0 → 1,21
#!/bin/bash |
# restart using a Tcl shell \ |
exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ |
( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ |
done ; \ |
echo "slow_cat.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" |
|
# Can be used like this: |
# Get flash ready for programming using Minicom or similar |
# [o (Option menu), a (flAsh menu), b (Boot write)] |
# Then execute the following |
# slow_cat.tcl < install/bin/gdb_module.srec >/dev/ttyS0 |
|
# Delay lines by 1/10 of a second to allow the flash to recover The |
# gets also strips off the broken (DOS) new-lines that objcopy is |
# generating. The puts replace them with 0x0a which the firmware |
# requires. |
while { 0 <= [gets stdin line] } { |
puts $line |
after 100 |
} |