aboutsummaryrefslogtreecommitdiff
path: root/src/target/target.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-07 10:48:44 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-07 10:48:44 +0000
commit2b7504c27947a139473986fa65d977701addb88d (patch)
treefd1d9129478649b78afe7709fd211e773ce80ae2 /src/target/target.c
parenta2c45daf78cd243d16ce2a41531670741a19d310 (diff)
- only if "reset halt" or "reset init" are issued will the reset vector be set up
- If communication fails during assert between assert/deassert and during assert, warnings are printed. The warning suggests using srst_only if the clock locks up as that would allow the reset vector to be set up before asserting reset. git-svn-id: svn://svn.berlios.de/openocd/trunk@544 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/target.c')
-rw-r--r--src/target/target.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/target/target.c b/src/target/target.c
index 64f6cb8d..bfe0f14a 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -297,7 +297,11 @@ int target_process_reset(struct command_context_s *cmd_ctx)
target->type->assert_reset(target);
target = target->next;
}
- jtag_execute_queue();
+ if ((retval = jtag_execute_queue()) != ERROR_OK)
+ {
+ LOG_WARNING("JTAG communication failed asserting reset.");
+ retval = ERROR_OK;
+ }
/* request target halt if necessary, and schedule further action */
target = targets;
@@ -330,13 +334,24 @@ int target_process_reset(struct command_context_s *cmd_ctx)
target = target->next;
}
+ if ((retval = jtag_execute_queue()) != ERROR_OK)
+ {
+ LOG_WARNING("JTAG communication failed while reset was asserted. Consider using srst_only for reset_config.");
+ retval = ERROR_OK;
+ }
+
target = targets;
while (target)
{
target->type->deassert_reset(target);
target = target->next;
}
- jtag_execute_queue();
+
+ if ((retval = jtag_execute_queue()) != ERROR_OK)
+ {
+ LOG_WARNING("JTAG communication failed while deasserting reset.");
+ retval = ERROR_OK;
+ }
LOG_DEBUG("Waiting for halted stated as approperiate");