Reset wip. Just adding hooks. This is just to reduce the size of the actual change, no change in behaviour.

git-svn-id: svn://svn.berlios.de/openocd/trunk@565 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2008-04-11 14:06:42 +00:00
parent 0d7d64b5e9
commit c4a2fdbc39
12 changed files with 93 additions and 60 deletions

View File

@@ -574,22 +574,22 @@ int armv4_5_run_algorithm(struct target_s *target, int num_mem_params, mem_param
return ERROR_TARGET_FAILURE;
}
target->type->resume(target, 0, entry_point, 1, 1);
target->type->poll(target);
target_resume(target, 0, entry_point, 1, 1);
target_poll(target);
while (target->state != TARGET_HALTED)
{
usleep(10000);
target->type->poll(target);
target_poll(target);
if ((timeout_ms -= 10) <= 0)
{
LOG_ERROR("timeout waiting for algorithm to complete, trying to halt target");
target->type->halt(target);
target_halt(target);
timeout_ms = 1000;
while (target->state != TARGET_HALTED)
{
usleep(10000);
target->type->poll(target);
target_poll(target);
if ((timeout_ms -= 10) <= 0)
{
LOG_ERROR("target didn't reenter debug state, exiting");