This is an automated email from Gerrit. "Antonio Borneo <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9202
-- gerrit commit 3bcc08d56a0dc1300c69fc94ed4fe9d158fcc462 Author: Antonio Borneo <[email protected]> Date: Mon Nov 3 11:18:02 2025 +0100 target: cortex-m: don't query cache on hla targets The cache handling code is written and optimized for dap queuing. On hla targets it causes a segmentation fault due to uninitialized AP pointer still set to NULL. While it's possible to modify the code to cope with hla targets, this would lower the OpenOCD performance on modern adapters. Make cache handling not available on hla targets. Reported-by: Tomas Vanek <[email protected]> Change-Id: Ief4499caedcee477b9517a7ad4597d06b5cb061e Signed-off-by: Antonio Borneo <[email protected]> Fixes: 04da6e2c6246 ("target: cortex-m: add support for armv8m caches") diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 21b611b297..9f0b6284b0 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -3007,10 +3007,12 @@ int cortex_m_examine(struct target *target) cortex_m->fp_num_code, cortex_m->dwt_num_comp); - retval = armv7m_identify_cache(target); - if (retval != ERROR_OK) { - LOG_ERROR("Cannot detect cache"); - return retval; + if (!armv7m->is_hla_target) { + retval = armv7m_identify_cache(target); + if (retval != ERROR_OK) { + LOG_ERROR("Cannot detect cache"); + return retval; + } } } --
