From 2044df3dac715e5bf03a2ebac87048f808d1c7b1 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sat, 14 Nov 2020 16:38:38 +0100 Subject: [PATCH] armv7m: replace flag 'stlink' with 'is_hla_target' The HLA target is not anymore used by ST-Link only, but required by Nu-Link and TI-ICDI too. Rename the flag 'stlink' as 'is_hla_target'. Change-Id: Id2ee2c0a1e8bf1f1e899f7a560140c34eefeeee5 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/6206 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI --- src/target/armv7m.h | 4 ++-- src/target/cortex_m.c | 6 +++--- src/target/hla_target.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/target/armv7m.h b/src/target/armv7m.h index f3445e1527..f3eb90f248 100644 --- a/src/target/armv7m.h +++ b/src/target/armv7m.h @@ -239,8 +239,8 @@ struct armv7m_common { int fp_feature; uint32_t demcr; - /* stlink is a high level adapter, does not support all functions */ - bool stlink; + /* hla_target uses a high level adapter that does not support all functions */ + bool is_hla_target; struct armv7m_trace_config trace_config; diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index d0256b1343..c30556c8a8 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -2031,9 +2031,9 @@ int cortex_m_examine(struct target *target) struct adiv5_dap *swjdp = cortex_m->armv7m.arm.dap; struct armv7m_common *armv7m = target_to_armv7m(target); - /* stlink shares the examine handler but does not support + /* hla_target shares the examine handler but does not support * all its calls */ - if (!armv7m->stlink) { + if (!armv7m->is_hla_target) { if (cortex_m->apsel == DP_APSEL_INVALID) { /* Search for the MEM-AP */ retval = cortex_m_find_mem_ap(swjdp, &armv7m->debug_ap); @@ -2127,7 +2127,7 @@ int cortex_m_examine(struct target *target) for (size_t idx = ARMV8M_FIRST_REG; idx <= ARMV8M_LAST_REG; idx++) armv7m->arm.core_cache->reg_list[idx].exist = false; - if (!armv7m->stlink) { + if (!armv7m->is_hla_target) { if (cortex_m->core_info->flags & CORTEX_M_F_TAR_AUTOINCR_BLOCK_4K) /* Cortex-M3/M4 have 4096 bytes autoincrement range, * s. ARM IHI 0031C: MEM-AP 7.2.2 */ diff --git a/src/target/hla_target.c b/src/target/hla_target.c index cd57dd207d..7688927fec 100644 --- a/src/target/hla_target.c +++ b/src/target/hla_target.c @@ -179,7 +179,7 @@ static int adapter_init_arch_info(struct target *target, armv7m->store_core_reg_u32 = adapter_store_core_reg_u32; armv7m->examine_debug_reason = adapter_examine_debug_reason; - armv7m->stlink = true; + armv7m->is_hla_target = true; target_register_timer_callback(hl_handle_target_request, 1, TARGET_TIMER_TYPE_PERIODIC, target); -- 2.30.2