This is an automated email from Gerrit. Paul Fertser ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/3943
-- gerrit commit 17945d6e70b83390e5d1fbcb53f89d90153d9b07 Author: Paul Fertser <[email protected]> Date: Sat Jan 7 21:51:32 2017 +0300 target: cortex_m: fix test for SRST assertion in cortex_m_halt() When SRST is never enabled, the global jtag_srst variable is left at its initial state, that is, -1, and it does _not_ mean SRST is currently asserted. Fixes "reset halt" in cases when srst_pulls_trst but srst usage is not enabled. Change-Id: I8d2e9120479de4cfbf5561033926c9ef945eecc9 Signed-off-by: Paul Fertser <[email protected]> diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 36a7746..c5ee014 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -591,7 +591,7 @@ static int cortex_m_halt(struct target *target) LOG_WARNING("target was in unknown state when halt was requested"); if (target->state == TARGET_RESET) { - if ((jtag_get_reset_config() & RESET_SRST_PULLS_TRST) && jtag_get_srst()) { + if ((jtag_get_reset_config() & RESET_SRST_PULLS_TRST) && jtag_get_srst() == 1) { LOG_ERROR("can't request a halt while in reset if nSRST pulls nTRST"); return ERROR_TARGET_FAILURE; } else { -- ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
