aboutsummaryrefslogtreecommitdiffstats
path: root/de1flash.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'de1flash.tcl')
-rw-r--r--de1flash.tcl7
1 files changed, 4 insertions, 3 deletions
diff --git a/de1flash.tcl b/de1flash.tcl
index b6c8c6b..ef7e062 100644
--- a/de1flash.tcl
+++ b/de1flash.tcl
@@ -159,10 +159,11 @@ proc fl_erase addr {
set read_cmd [format "D0%08X%08X" $secaddr 8]
- set ndone 1
- while { $ndone } {
+ set done 0
+ while { !$done } {
fl_send $read_cmd
- set ndone [string match [fl_recv] "\[89ABCDEF\]DFFFFFFFFFFFFFFFF"]
+ set v [fl_recv]
+ set done [string match {[89ABCDEF]DFFFFFFFFFFFFFFFF} $v]
}
puts "done."
} else {