wait 500ms for target to halt upon connect.

git-svn-id: svn://svn.berlios.de/openocd/trunk@865 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2008-07-24 06:07:55 +00:00
parent 1c92ff6a04
commit 06d501a192
3 changed files with 12 additions and 5 deletions

View File

@@ -509,6 +509,7 @@ int gdb_get_packet_inner(connection_t *connection, char *buffer, int *len)
my_checksum += character & 0xff;
buffer[count++] = character & 0xff;
}
}
*len = count;
@@ -678,6 +679,12 @@ int gdb_new_connection(connection_t *connection)
* connect.
*/
target_halt(gdb_service->target);
/* FIX!!!! could extended-remote work better here?
*
* wait a tiny bit for halted state or we just continue. The
* GDB register packet will then contain garbage
*/
target_wait_state(gdb_service->target, TARGET_HALTED, 500);
/* remove the initial ACK from the incoming buffer */
if ((retval = gdb_get_char(connection, &initial_ack)) != ERROR_OK)