From: openocd-gerrit <ope...@us...> - 2025-06-21 07:37:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 82dc399e5e73495c0464283cff331854271706be (commit) from 9e4b6b90c960b769bf87cf233e638198d96da647 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 82dc399e5e73495c0464283cff331854271706be Author: Tomas Vanek <va...@fb...> 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 <de...@za...> Change-Id: I685618ed158abde11f6e00eeeee1dfa8ed90952d Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8945 Tested-by: jenkins Reviewed-by: zapb <de...@za...> diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index ba9d83d79..8eaf70f60 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"); } ----------------------------------------------------------------------- Summary of changes: src/target/cortex_m.c | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- Main OpenOCD repository |