This is an automated email from Gerrit. "Tomas Vanek <van...@fbl.cz>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8945
-- gerrit commit dfe9edbb5cdf2503ba80b0c8f2001fdd8f0f6bda Author: Tomas Vanek <van...@fbl.cz> Date: Sat Jun 14 12:18:53 2025 +0200 target/cortex_m: fix debug reason after reset halt [1] removed target_halt() from cortex_m_assert_reset() It broke debug_reason tracking and the previous reason was shown after reset halt. Set debug_reason to DBG_REASON_DBGRQ during reset halt preparation. Fixes: [1] commit 226085065bdf ("target/cortex_m: drop useless target_halt() call") Reported-by: Marc Schink <d...@zapb.de> Change-Id: I685618ed158abde11f6e00eeeee1dfa8ed90952d Signed-off-by: Tomas Vanek <van...@fbl.cz> diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index ba9d83d79f..8eaf70f60a 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -1779,6 +1779,7 @@ static int cortex_m_assert_reset(struct target *target) int retval2; retval2 = mem_ap_write_atomic_u32(armv7m->debug_ap, DCB_DEMCR, TRCENA | VC_HARDERR | VC_BUSERR | VC_CORERESET); + target->debug_reason = DBG_REASON_DBGRQ; if (retval != ERROR_OK || retval2 != ERROR_OK) LOG_TARGET_INFO(target, "AP write error, reset will not halt"); } --