aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2015-12-06 17:18:40 +0100
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2015-12-29 20:28:45 +0000
commitf9dfbf3ac75f65dad324fea641e08acca6a8a5e3 (patch)
tree0be86c4d5f0267ad80ea1b77302943d4fb69a187 /src
parent557aa6dc5c596f2475d41c62e5a62c53d17dd421 (diff)
cortex_a: Find debug base using the detected APB-AP and not AP 1
Change-Id: I6b98c3b4486903029e5a0d6d964bd5c48ff55926 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3148 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src')
-rw-r--r--src/target/cortex_a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c
index 61e09895..266c372a 100644
--- a/src/target/cortex_a.c
+++ b/src/target/cortex_a.c
@@ -2967,11 +2967,11 @@ static int cortex_a_examine_first(struct target *target)
int32_t coreidx = target->coreid;
LOG_DEBUG("%s's dbgbase is not set, trying to detect using the ROM table",
target->cmd_name);
- retval = dap_get_debugbase(swjdp, 1, &dbgbase, &apid);
+ retval = dap_get_debugbase(swjdp, armv7a->debug_ap->ap_num, &dbgbase, &apid);
if (retval != ERROR_OK)
return retval;
/* Lookup 0x15 -- Processor DAP */
- retval = dap_lookup_cs_component(swjdp, 1, dbgbase, 0x15,
+ retval = dap_lookup_cs_component(swjdp, armv7a->debug_ap->ap_num, dbgbase, 0x15,
&armv7a->debug_base, &coreidx);
if (retval != ERROR_OK) {
LOG_ERROR("Can't detect %s's dbgbase from the ROM table; you need to specify it explicitly.",