This is an automated email from Gerrit. "Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8177
-- gerrit commit 432aa59211cd5274baeaeb157b1b48ac317c52ec Author: Antonio Borneo <borneo.anto...@gmail.com> Date: Fri Mar 15 15:14:53 2024 +0100 target/cortex_m: drop check on defer_examine The callback assert_reset() will never be called on targets that have defer_examine set. Drop the useless check on defer_examine. This modifies the commit f65d1da01356 ("target/cortex_m: try to re-examine under reset in cortex_m_assert_reset()") and reverts the commit 38616990744b ("target/cortex_m: prevent asserting reset if examine is deferred"). Change-Id: I1ec40d070cb8d0d569d3884c9f18fb909b72aa63 Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com> diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 4894cabf8b..3d93c3c085 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -1612,8 +1612,7 @@ static int cortex_m_assert_reset(struct target *target) bool srst_asserted = false; if ((jtag_reset_config & RESET_HAS_SRST) && - ((jtag_reset_config & RESET_SRST_NO_GATING) - || (!armv7m->debug_ap && !target->defer_examine))) { + ((jtag_reset_config & RESET_SRST_NO_GATING) || !armv7m->debug_ap)) { /* If we have no debug_ap, asserting SRST is the only thing * we can do now */ adapter_assert_reset(); @@ -1622,7 +1621,7 @@ static int cortex_m_assert_reset(struct target *target) /* TODO: replace the hack calling target_examine_one() * as soon as a better reset framework is available */ - if (!target_was_examined(target) && !target->defer_examine + if (!target_was_examined(target) && srst_asserted && (jtag_reset_config & RESET_SRST_NO_GATING)) { LOG_TARGET_DEBUG(target, "Trying to re-examine under reset"); target_examine_one(target); --