X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Ftarget%2Ftarget.c;h=bfe0f14aeb6a41b35d7420fcab69d921a08a597e;hb=2b7504c27947a139473986fa65d977701addb88d;hp=64f6cb8d8768c0319300f9668cdc8febf8a1dad7;hpb=a2c45daf78cd243d16ce2a41531670741a19d310;p=openocd.git diff --git a/src/target/target.c b/src/target/target.c index 64f6cb8d87..bfe0f14aeb 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");