aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/target/cortex_a.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c
index 8773ea16..a79b0b90 100644
--- a/src/target/cortex_a.c
+++ b/src/target/cortex_a.c
@@ -2718,6 +2718,10 @@ static int cortex_a_examine_first(struct target *target)
} else
armv7a->debug_base = target->dbgbase;
+ if ((armv7a->debug_base & (1UL<<31)) == 0)
+ LOG_WARNING("Debug base address for target %s has bit 31 set to 0. Access to debug registers will likely fail!\n"
+ "Please fix the target configuration.", target_name(target));
+
retval = mem_ap_read_atomic_u32(armv7a->debug_ap,
armv7a->debug_base + CPUDBG_DIDR, &didr);
if (retval != ERROR_OK) {