X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Fstartup.tcl;h=ff053ae1b229bc27aa0b52a0795b5f72a70d0ec5;hp=7a96a3e3b8496dd14bccb2de3fe999f2cebc5bf8;hb=9542cb7c3d9f4b66d2df3d8412a73d008077ab86;hpb=30f802493d1237eeef21282d4224ed89d8a4d480 diff --git a/src/flash/startup.tcl b/src/flash/startup.tcl index 7a96a3e3b8..ff053ae1b2 100644 --- a/src/flash/startup.tcl +++ b/src/flash/startup.tcl @@ -8,8 +8,8 @@ proc program_error {description exit} { if {$exit == 1} { - echo $description - shutdown + echo $description + shutdown error } error $description @@ -42,6 +42,7 @@ proc program {filename args} { # start programming phase echo "** Programming Started **" + set filename \{$filename\} if {[info exists address]} { set flash_args "$filename $address" } else { @@ -62,8 +63,10 @@ proc program {filename args} { if {[info exists reset]} { # reset target if requested - # also disable target polling, we are shutting down anyway - poll off + if {$exit == 1} { + # also disable target polling, we are shutting down anyway + poll off + } echo "** Resetting Target **" reset run }