|
From: Sergei A. <sa...@gm...> - 2017-01-05 22:21:43
|
On 5 January 2017 at 18:59, Sergei Antonov <sa...@gm...> wrote: > On 5 January 2017 at 10:11, Matthias Welwarsky <mat...@we...> wrote: >> Hello Sergei, >> >> On Thursday 05 January 2017 01:25:35 Sergei Antonov wrote: >>> Hello! >>> I'd like to use OpenOCD with a development board containing a Qualcomm >>> Snapdragon 820 (APQ8096) processor, its architecture is AArch64. Here >>> is the scanned JTAG chain: >>> >>> Info : JTAG tap: auto0.tap tap/device found: 0x5ba00477 (mfg: 0x23b >>> (ARM Ltd.), part: 0xba00, ver: 0x5) >>> Info : JTAG tap: auto1.tap tap/device found: 0x000016dd (mfg: 0x36e >>> (Certicom Corporation), part: 0x0001, ver: 0x0) >>> Info : JTAG tap: auto2.tap tap/device found: 0x4003e0e1 (mfg: 0x070 >>> (Qualcomm), part: 0x003e, ver: 0x4) >>> >>> I suppose, I can debug device 0x5ba00477 as aarch64 target using >>> development source code. What repo/branch of OpenOCD should I use? >>> On Gerrit there are lots of patches for aarch64, I'm confused about >>> what exactly is state-of-the-art or has best chances to work on my >>> hardware. >> >> If you checkout http://openocd.zylin.com/#/c/3832, you get a pretty good base >> for aarch64 debugging. You will also likely need this patch: >> >> http://openocd.zylin.com/#/c/3710 on top, you should be able to cherry-pick >> it. > > Thanks, Matthias! I took c/3832, cherry-picked changes from c/3710, > and added -ignore-syspwrupack to my .cfg. Unfortunately, target > examination fails. Details are below. > > == openocd.cfg == > source [find interface/altera-usb-blaster.cfg] > jtag newtap auto0 tap -irlen 4 -expected-id 0x5ba00477 -ignore-syspwrupack > jtag newtap auto1 tap -irlen 5 -expected-id 0x000016dd > jtag newtap auto2 tap -irlen 11 -expected-id 0x4003e0e1 > target create target0 aarch64 -endian little -chain-position auto0.tap > init > > == Relevant part of debug output == > Debug: 193 21 core.c:1399 jtag_init_inner(): Init JTAG chain > Debug: 194 21 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset > Debug: 195 21 core.c:1060 jtag_examine_chain(): DR scan interrogation > for IDCODE/BYPASS > Debug: 196 21 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset > Info : 197 29 core.c:959 jtag_examine_chain_display(): JTAG tap: > auto0.tap tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: > 0xba00, ver: 0x5) > Info : 198 29 core.c:959 jtag_examine_chain_display(): JTAG tap: > auto1.tap tap/device found: 0x000016dd (mfg: 0x36e (Certicom > Corporation), part: 0x0001, ver: 0x0) > Info : 199 29 core.c:959 jtag_examine_chain_display(): JTAG tap: > auto2.tap tap/device found: 0x4003e0e1 (mfg: 0x070 (Qualcomm), part: > 0x003e, ver: 0x4) > Debug: 200 29 core.c:1190 jtag_validate_ircapture(): IR capture validation scan > Debug: 201 34 core.c:1248 jtag_validate_ircapture(): auto0.tap: IR capture 0x01 > Debug: 202 34 core.c:1248 jtag_validate_ircapture(): auto1.tap: IR capture 0x01 > Debug: 203 34 core.c:1248 jtag_validate_ircapture(): auto2.tap: IR capture 0x1 > Debug: 204 34 openocd.c:148 handle_init_command(): Examining targets... > Debug: 205 34 target.c:1513 target_call_event_callbacks(): target > event 21 (examine-start) > Debug: 206 34 arm_adi_v5.c:603 dap_dp_init(): > Debug: 207 34 arm_adi_v5.c:636 dap_dp_init(): DAP: wait CDBGPWRUPACK > Debug: 208 34 arm_adi_v5.h:432 dap_dp_poll_register(): DAP: poll 4, > mask 0x20000000, value 0x20000000 > Debug: 209 135 arm_adi_v5.c:789 dap_find_ap(): Found APB-AP at AP > index: 1 (IDR=0x44770002) > Debug: 210 173 adi_v5_jtag.c:572 jtagdp_transaction_endcheck(): > jtag-dp: CTRL/STAT 0x70000021 > Error: 211 173 adi_v5_jtag.c:584 jtagdp_transaction_endcheck(): > JTAG-DP STICKY ERROR > Error: 212 178 aarch64.c:1825 aarch64_examine_first(): Could not > initialize the APB-AP > Debug: 213 178 openocd.c:150 handle_init_command(): target examination failed The first time I try to connect after rebooting the device, behavior is different (though examination fails anyway): Debug: 206 35 arm_adi_v5.c:603 dap_dp_init(): Debug: 207 35 arm_adi_v5.c:636 dap_dp_init(): DAP: wait CDBGPWRUPACK Debug: 208 35 arm_adi_v5.h:432 dap_dp_poll_register(): DAP: poll 4, mask 0x20000000, value 0x20000000 Debug: 209 136 arm_adi_v5.c:789 dap_find_ap(): Found APB-AP at AP index: 1 (IDR=0x44770002) Debug: 210 174 arm_adi_v5.c:716 mem_ap_init(): MEM_AP Packed Transfers: disabled Debug: 211 174 arm_adi_v5.c:727 mem_ap_init(): MEM_AP CFG: large data 0, long address 0, big-endian 0 Error: 212 3761 adi_v5_jtag.c:450 jtagdp_overrun_check(): Timeout during WAIT recovery Error: 213 3780 arm_adi_v5.c:845 dap_lookup_cs_component(): Can't read component with base address 0x80030000, the corresponding core might be turned off Debug: 214 3780 openocd.c:150 handle_init_command(): target examination failed |