X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Fcortex_a.c;h=d0eac751f6df3acbb0428126d3e3e7509586917e;hp=91fa48e1adcc1e56aabb13a3b8e0ef7387a5f28a;hb=5be455a710c57bbbbd49c2d671b42098db7be5dc;hpb=3b021e013f2e120b8c8e3d141849934edf2bdceb diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 91fa48e1ad..d0eac751f6 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -54,6 +54,7 @@ #include "target_type.h" #include "arm_opcodes.h" #include "arm_semihosting.h" +#include "jtag/swd.h" #include static int cortex_a_poll(struct target *target); @@ -1867,9 +1868,15 @@ static int cortex_a_assert_reset(struct target *target) /* REVISIT handle "pulls" cases, if there's * hardware that needs them to work. */ - if (target->reset_halt) - if (jtag_get_reset_config() & RESET_SRST_NO_GATING) - jtag_add_reset(0, 1); + + /* + * FIXME: fix reset when transport is SWD. This is a temporary + * work-around for release v0.10 that is not intended to stay! + */ + if (transport_is_swd() || + (target->reset_halt && (jtag_get_reset_config() & RESET_SRST_NO_GATING))) + jtag_add_reset(0, 1); + } else { LOG_ERROR("%s: how to reset?", target_name(target)); return ERROR_FAIL; @@ -3103,6 +3110,7 @@ static int cortex_a_init_target(struct command_context *cmd_ctx, struct target *target) { /* examine_first() does a bunch of this */ + arm_semihosting_init(target); return ERROR_OK; }