X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Fstartup.tcl;h=ff053ae1b229bc27aa0b52a0795b5f72a70d0ec5;hp=fbb8d8ee498249538aed598e186e31a1404479a3;hb=b95e0c13aa64ebbc8407ce8b974b1efd44df84c9;hpb=19f219f731f29503c8e4d432935d3ea558cc1659 diff --git a/src/flash/startup.tcl b/src/flash/startup.tcl index fbb8d8ee49..ff053ae1b2 100644 --- a/src/flash/startup.tcl +++ b/src/flash/startup.tcl @@ -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 }