target/target.c: adding keep_alive() to while loop.
[openocd.git] / src / target / target.c
index bf36691..8715883 100644 (file)
@@ -1047,6 +1047,9 @@ int target_run_flash_async_algorithm(struct target *target,
                retval = target_write_u32(target, wp_addr, wp);
                if (retval != ERROR_OK)
                        break;
+
+               /* Avoid GDB timeouts */
+               keep_alive();
        }
 
        if (retval != ERROR_OK) {