No, without specifying -dbgbase we are dead in the water...

Debug: 229 825 cortex_a.c:2385 cortex_a_examine_first(): Could not find
AHB-AP - using APB-AP for memory access
Debug: 230 825 cortex_a.c:2398 cortex_a_examine_first(): at91sama5d31.cpu's
dbgbase is not set, trying to detect using the ROM table
Debug: 231 831 openocd.c:152 handle_init_command(): target examination
failed

When I do specify it we have goodness...

Debug: 229 825 cortex_a.c:2385 cortex_a_examine_first(): Could not find
AHB-AP - using APB-AP for memory access
Debug: 230 840 cortex_a.c:2445 cortex_a_examine_first(): cpuid = 0x410fc051
Debug: 231 840 cortex_a.c:2446 cortex_a_examine_first(): ctypr = 0x83338003
Debug: 232 840 cortex_a.c:2447 cortex_a_examine_first(): ttypr = 0x00000000
Debug: 233 840 cortex_a.c:2448 cortex_a_examine_first(): didr = 0x1203f001
Info : 234 840 arm_dpm.c:987 arm_dpm_setup(): at91sama5d31.cpu: hardware
has 3 breakpoints, 2 watchpoints
Debug: 235 840 cortex_a.c:703 cortex_a_bpwp_disable(): A: bpwp disable, cr
80010140
Debug: 236 843 cortex_a.c:703 cortex_a_bpwp_disable(): A: bpwp disable, cr
80010144
Debug: 237 846 cortex_a.c:703 cortex_a_bpwp_disable(): A: bpwp disable, cr
80010148
Debug: 238 849 cortex_a.c:703 cortex_a_bpwp_disable(): A: bpwp disable, cr
800101c0
Debug: 239 852 cortex_a.c:703 cortex_a_bpwp_disable(): A: bpwp disable, cr
800101c4
Debug: 240 855 cortex_a.c:2472 cortex_a_examine_first(): Configured 3 hw
breakpoints
Debug: 241 855 cortex_a.c:174 cortex_a_init_debug_access():
Debug: 242 864 target.c:1405 target_call_event_callbacks(): target event 22
(examine-end)

I got these result with this command line:

openocd --file ./at91sama5d3x.cfg

where ./at91sama5d3x.cfg is a simple hack config (not my real, procedural
one):

*$ cat ./at91sama5d3x.cfg*
# ----------------------------
set _CPUTAPID     0x4BA00477
set _CHIPNAME     at91sama5d31
set _TARGETNAME $_CHIPNAME.cpu

source [find interface/jlink.cfg]

log_output "/tmp/openocd.log"
debug_level 3

transport select           jtag
adapter_khz                1000
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id
$_CPUTAPID -ignore-version

target create $_TARGETNAME cortex_a -dbgbase 0x80010000 -chain-position
$_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x00310000 -work-area-size 8192
-work-area-backup 1

init
# ---------------------------

Regards,

- Mark

On Fri, Jan 2, 2015 at 2:04 PM, Paul Fertser <[email protected]> wrote:

> On Fri, Jan 02, 2015 at 02:00:50PM -0500, Mark Odell wrote:
> > I think I found the patch to fix my issue. I had two issues in fact. The
> first
> > issue was the wrong -dbgbase <address>. For SAMA5D36 it should be
> -dbgbase
> > 0x80010000.
>
> Isn't it getting properly autodetected from the DAP ROM table? Have
> you tried omitting it and looking at -d3 output?
>
> > The second issue turned out to be off-by-one on register reads. E.g.
> > reading 0xFFFF_FC24 returned the value in 0xFFFF_FC20, the real
> > value for 0xFFFF_FC24 shows up when reading 0xFFFF_FC28, and so
> > on. This patch,
> > [1]http://openocd.zylin.com/#/c/2299/2/src/target/cortex_a.c,cm,
> > fixed that problem.
>
> Great, noticed. I hope it's getting merged soon.
>
> > Thanks for the help. Much appreciated.
>
> Welcome. Please keep us informed about your progress, and once you
> have a useful config file, please do not hesitate to contribute
> upstream.
>
> --
> Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
> mailto:[email protected]
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to