aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2020-11-14 16:38:38 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2021-06-26 14:41:15 +0100
commit2044df3dac715e5bf03a2ebac87048f808d1c7b1 (patch)
tree65c8684667d3d390c73f7f6b66808ec11f092e70
parent873e5c3976eb82589d5a645266b6ae75cb4c2ecf (diff)
downloadriscv-openocd-2044df3dac715e5bf03a2ebac87048f808d1c7b1.zip
riscv-openocd-2044df3dac715e5bf03a2ebac87048f808d1c7b1.tar.gz
riscv-openocd-2044df3dac715e5bf03a2ebac87048f808d1c7b1.tar.bz2
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 <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6206 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
-rw-r--r--src/target/armv7m.h4
-rw-r--r--src/target/cortex_m.c6
-rw-r--r--src/target/hla_target.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/target/armv7m.h b/src/target/armv7m.h
index f3445e1..f3eb90f 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 d0256b1..c30556c 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 cd57dd2..7688927 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);