flash/stm32h7x: fix register names to comply with RM0399 Rev2 and RM0433 Rev6
[fw/openocd] / src / flash / startup.tcl
index fbb8d8ee498249538aed598e186e31a1404479a3..ff053ae1b229bc27aa0b52a0795b5f72a70d0ec5 100644 (file)
@@ -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
                }