Skip to content

Instantly share code, notes, and snippets.

@oholiab
Created July 29, 2020 13:13
Show Gist options
  • Save oholiab/62dd57193add848e180fd630a7745372 to your computer and use it in GitHub Desktop.
Save oholiab/62dd57193add848e180fd630a7745372 to your computer and use it in GitHub Desktop.

The problem

I have yet to successfully establish an SWD connection with the PineTime. I am currently using a Segger J-Link EDU Mini, and have previously attempted using the SPI fork of openocd with a Pi 3. I bought the J-Link new in order to debug this specific problem.

Currently, the PineTime won't boot to anything and has a blank screen with no backlight.

Attempting to connect over SWD with any of the tools mentioned with output below turns the backlight and motor on (thankfully the motor is on the back face of the watch so doesn't fire until you attach it)

I've rebuilt the wiring for my flashing setup several times to eliminate the possibility of miswiring or shorts.

Manual reset by shorting the battery results in no voltage across VCC and GND, but reattaching to the power supply and removing again rectifies this.

If you try connecting with e.g. nrfjprog before reattaching to the power supply, you get this message (which is consistent with my own testing with a multimeter):

> nrfjprog -f nrf52 --recover --log
ERROR: Low voltage detected at the target. Please make sure the device is
ERROR: properly supplied.

Debugging

Here are some of the things I have tried. I think the output below is consistent with failure to establish an SWD connection at all. I am (as mentioned above) confident of the wiring.

nrfjprog

2020-Jul-29 13:53:55  --------------------------------------------------------------------------------
2020-Jul-29 13:53:55  nrfjprog -f nrf52 --recover --log
2020-Jul-29 13:53:55  nrfjprog version 10.9.0
2020-Jul-29 13:53:55  --------------------------------------------------------------------------------
2020-Jul-29 13:53:55  nRF_logger_open
2020-Jul-29 13:53:55  nRF_logger_open:  nRFJProg logger opened to callback at address 0X559BB600EC60
2020-Jul-29 13:53:55  nRF_open_dll
2020-Jul-29 13:53:55  nRF_open_dll:     Load library at "/opt/nrfjprog/libjlinkarm_nrf52_nrfjprogdll.so".

2020-Jul-29 13:53:55  . nRF52_logger_open
2020-Jul-29 13:53:55  . nRF52_logger_open:      nRFJProg logger opened to callback at address 0X7F6524EF8190
2020-Jul-29 13:53:55  . nRF52_open
2020-Jul-29 13:53:55  . . Segger_logger_open
2020-Jul-29 13:53:55  . . Segger_logger_open:   nRFJProg logger opened to callback at address 0X7F6524B48850
2020-Jul-29 13:53:55  . . Segger_open_dll
2020-Jul-29 13:53:55  . . Segger_open_dll:      No J-Link DLL path was provided. Attempting to auto detect.

2020-Jul-29 13:53:55  . . Segger_open_dll:      Load library at "/opt/SEGGER/JLink/libjlinkarm.so.6".

2020-Jul-29 13:53:55  . . . Segger_dll_version
2020-Jul-29 13:53:55  nRF_enum_emu_snr
2020-Jul-29 13:53:55  . nRF52_enum_emu_snr
2020-Jul-29 13:53:55  . . Segger_is_connected_to_emu
2020-Jul-29 13:53:55  . . Segger_enum_emu_snr
2020-Jul-29 13:53:55  . . . Segger_enum_emu_snr
2020-Jul-29 13:53:55  . . . . Segger_get_num_emus
2020-Jul-29 13:53:55  . . Segger_is_connected_to_emu
2020-Jul-29 13:53:55  nRF_connect_to_emu_with_snr
2020-Jul-29 13:53:55  . nRF52_connect_to_emu_with_snr
2020-Jul-29 13:53:55  . . Segger_is_connected_to_emu
2020-Jul-29 13:53:55  . . Segger_connect_to_emu_with_snr
2020-Jul-29 13:53:55  . . . Segger_is_connected_to_emu
2020-Jul-29 13:53:55  . . . Segger_enum_emu_snr
2020-Jul-29 13:53:55  . . . . Segger_get_num_emus
2020-Jul-29 13:53:55  . . . Segger_connect_to_emu_with_snr
2020-Jul-29 13:53:55  . . . . Segger_connect_to_emu_without_snr
2020-Jul-29 13:53:55  . . . . Segger_connect_to_emu_without_snr:        Segger logging enabled with callback at 0x140072384459104.

2020-Jul-29 13:53:56  . . . . . Segger_load_core_data
2020-Jul-29 13:53:56  . . Segger_read_debug_port_idr
2020-Jul-29 13:53:56  . . . Segger_read_debug_port_register
2020-Jul-29 13:53:56  . . . . Segger_read_debug_port_register
2020-Jul-29 13:53:56  . . . . . Segger_coresight_configure
2020-Jul-29 13:53:56  . . . . Segger_read_debug_port_register:  JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:53:56  . . . . . Segger_abort_debug_action
2020-Jul-29 13:53:56  . . . . . Segger_abort_debug_action:      Attempting to clear any configuration errors in debug port before closing connection.

2020-Jul-29 13:53:56  . . . . . Segger_abort_debug_action:      JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:53:56  nRF_close_dll
2020-Jul-29 13:53:56  . nRF52_close
2020-Jul-29 13:53:56  . . Segger_is_connected_to_emu
2020-Jul-29 13:53:56  . . Segger_close
2020-Jul-29 13:53:56  . . . Segger_disconnect_from_emu
2020-Jul-29 13:53:56  . . . . Segger_disconnect_from_emu
2020-Jul-29 13:53:56  . . . . . Segger_is_connected_to_device
2020-Jul-29 13:53:56  . . . . . Segger_is_debug_region_powered
2020-Jul-29 13:53:56  . . . . . . Segger_read_debug_port_register
2020-Jul-29 13:53:56  . . . . . . . Segger_write_debug_port_register
2020-Jul-29 13:53:56  . . . . . . . Segger_write_debug_port_register:   JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:53:56  . . . . . . . . Segger_abort_debug_action
2020-Jul-29 13:53:56  . . . . . . . . Segger_abort_debug_action:        Attempting to clear any configuration errors in debug port before closing connection.

2020-Jul-29 13:53:56  . . . . . . . . Segger_abort_debug_action:        JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:53:56  . . Segger_close: Freeing Library.

2020-Jul-29 13:53:56  nRF_close_dll:    Freeing Library.

2020-Jul-29 13:54:09  --------------------------------------------------------------------------------
2020-Jul-29 13:54:09  nrfjprog -f nrf52 --recover --log --verbose
2020-Jul-29 13:54:09  nrfjprog version 10.9.0
2020-Jul-29 13:54:09  --------------------------------------------------------------------------------
2020-Jul-29 13:57:02  --------------------------------------------------------------------------------
2020-Jul-29 13:57:02  nrfjprog -f nrf52 --pinreset --log
2020-Jul-29 13:57:02  nrfjprog version 10.9.0
2020-Jul-29 13:57:02  --------------------------------------------------------------------------------
2020-Jul-29 13:57:02  nRF_logger_open
2020-Jul-29 13:57:02  nRF_logger_open:  nRFJProg logger opened to callback at address 0X562D4BBC3C60
2020-Jul-29 13:57:02  nRF_open_dll
2020-Jul-29 13:57:02  nRF_open_dll:     Load library at "/opt/nrfjprog/libjlinkarm_nrf52_nrfjprogdll.so".

2020-Jul-29 13:57:02  . nRF52_logger_open
2020-Jul-29 13:57:02  . nRF52_logger_open:      nRFJProg logger opened to callback at address 0X7F2161E76190
2020-Jul-29 13:57:02  . nRF52_open
2020-Jul-29 13:57:02  . . Segger_logger_open
2020-Jul-29 13:57:02  . . Segger_logger_open:   nRFJProg logger opened to callback at address 0X7F2161AC6850
2020-Jul-29 13:57:02  . . Segger_open_dll
2020-Jul-29 13:57:02  . . Segger_open_dll:      No J-Link DLL path was provided. Attempting to auto detect.

2020-Jul-29 13:57:02  . . Segger_open_dll:      Load library at "/opt/SEGGER/JLink/libjlinkarm.so.6".

2020-Jul-29 13:57:02  . . . Segger_dll_version
2020-Jul-29 13:57:02  nRF_enum_emu_snr
2020-Jul-29 13:57:02  . nRF52_enum_emu_snr
2020-Jul-29 13:57:02  . . Segger_is_connected_to_emu
2020-Jul-29 13:57:02  . . Segger_enum_emu_snr
2020-Jul-29 13:57:02  . . . Segger_enum_emu_snr
2020-Jul-29 13:57:02  . . . . Segger_get_num_emus
2020-Jul-29 13:57:02  . . Segger_is_connected_to_emu
2020-Jul-29 13:57:02  nRF_connect_to_emu_with_snr
2020-Jul-29 13:57:02  . nRF52_connect_to_emu_with_snr
2020-Jul-29 13:57:02  . . Segger_is_connected_to_emu
2020-Jul-29 13:57:02  . . Segger_connect_to_emu_with_snr
2020-Jul-29 13:57:02  . . . Segger_is_connected_to_emu
2020-Jul-29 13:57:02  . . . Segger_enum_emu_snr
2020-Jul-29 13:57:02  . . . . Segger_get_num_emus
2020-Jul-29 13:57:03  . . . Segger_connect_to_emu_with_snr
2020-Jul-29 13:57:03  . . . . Segger_connect_to_emu_without_snr
2020-Jul-29 13:57:03  . . . . Segger_connect_to_emu_without_snr:        Segger logging enabled with callback at 0x139781349560672.

2020-Jul-29 13:57:03  . . . . . Segger_load_core_data
2020-Jul-29 13:57:03  . . Segger_read_debug_port_idr
2020-Jul-29 13:57:03  . . . Segger_read_debug_port_register
2020-Jul-29 13:57:03  . . . . Segger_read_debug_port_register
2020-Jul-29 13:57:03  . . . . . Segger_coresight_configure
2020-Jul-29 13:57:03  . . . . Segger_read_debug_port_register:  JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:57:03  . . . . . Segger_abort_debug_action
2020-Jul-29 13:57:03  . . . . . Segger_abort_debug_action:      Attempting to clear any configuration errors in debug port before closing connection.

2020-Jul-29 13:57:03  . . . . . Segger_abort_debug_action:      JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:57:03  nRF_close_dll
2020-Jul-29 13:57:03  . nRF52_close
2020-Jul-29 13:57:03  . . Segger_is_connected_to_emu
2020-Jul-29 13:57:03  . . Segger_close
2020-Jul-29 13:57:03  . . . Segger_disconnect_from_emu
2020-Jul-29 13:57:03  . . . . Segger_disconnect_from_emu
2020-Jul-29 13:57:03  . . . . . Segger_is_connected_to_device
2020-Jul-29 13:57:03  . . . . . Segger_is_debug_region_powered
2020-Jul-29 13:57:03  . . . . . . Segger_read_debug_port_register
2020-Jul-29 13:57:03  . . . . . . . Segger_write_debug_port_register
2020-Jul-29 13:57:03  . . . . . . . Segger_write_debug_port_register:   JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:57:03  . . . . . . . . Segger_abort_debug_action
2020-Jul-29 13:57:03  . . . . . . . . Segger_abort_debug_action:        Attempting to clear any configuration errors in debug port before closing connection.

2020-Jul-29 13:57:03  . . . . . . . . Segger_abort_debug_action:        JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:57:03  . . Segger_close: Freeing Library.

2020-Jul-29 13:57:03  nRF_close_dll:    Freeing Library.

2020-Jul-29 13:57:17  --------------------------------------------------------------------------------
2020-Jul-29 13:57:17  nrfjprog -f nrf52 --halt --log
2020-Jul-29 13:57:17  nrfjprog version 10.9.0
2020-Jul-29 13:57:17  --------------------------------------------------------------------------------
2020-Jul-29 13:57:17  nRF_logger_open
2020-Jul-29 13:57:17  nRF_logger_open:  nRFJProg logger opened to callback at address 0X559A36A05C60
2020-Jul-29 13:57:17  nRF_open_dll
2020-Jul-29 13:57:17  nRF_open_dll:     Load library at "/opt/nrfjprog/libjlinkarm_nrf52_nrfjprogdll.so".

2020-Jul-29 13:57:17  . nRF52_logger_open
2020-Jul-29 13:57:17  . nRF52_logger_open:      nRFJProg logger opened to callback at address 0X7F6F7AF93190
2020-Jul-29 13:57:17  . nRF52_open
2020-Jul-29 13:57:17  . . Segger_logger_open
2020-Jul-29 13:57:17  . . Segger_logger_open:   nRFJProg logger opened to callback at address 0X7F6F7ABE3850
2020-Jul-29 13:57:17  . . Segger_open_dll
2020-Jul-29 13:57:17  . . Segger_open_dll:      No J-Link DLL path was provided. Attempting to auto detect.

2020-Jul-29 13:57:17  . . Segger_open_dll:      Load library at "/opt/SEGGER/JLink/libjlinkarm.so.6".

2020-Jul-29 13:57:17  . . . Segger_dll_version
2020-Jul-29 13:57:17  nRF_enum_emu_snr
2020-Jul-29 13:57:17  . nRF52_enum_emu_snr
2020-Jul-29 13:57:17  . . Segger_is_connected_to_emu
2020-Jul-29 13:57:17  . . Segger_enum_emu_snr
2020-Jul-29 13:57:17  . . . Segger_enum_emu_snr
2020-Jul-29 13:57:17  . . . . Segger_get_num_emus
2020-Jul-29 13:57:17  . . Segger_is_connected_to_emu
2020-Jul-29 13:57:17  nRF_connect_to_emu_with_snr
2020-Jul-29 13:57:17  . nRF52_connect_to_emu_with_snr
2020-Jul-29 13:57:17  . . Segger_is_connected_to_emu
2020-Jul-29 13:57:17  . . Segger_connect_to_emu_with_snr
2020-Jul-29 13:57:17  . . . Segger_is_connected_to_emu
2020-Jul-29 13:57:17  . . . Segger_enum_emu_snr
2020-Jul-29 13:57:17  . . . . Segger_get_num_emus
2020-Jul-29 13:57:18  . . . Segger_connect_to_emu_with_snr
2020-Jul-29 13:57:18  . . . . Segger_connect_to_emu_without_snr
2020-Jul-29 13:57:18  . . . . Segger_connect_to_emu_without_snr:        Segger logging enabled with callback at 0x140116777607520.

2020-Jul-29 13:57:18  . . . . . Segger_load_core_data
2020-Jul-29 13:57:18  . . Segger_read_debug_port_idr
2020-Jul-29 13:57:18  . . . Segger_read_debug_port_register
2020-Jul-29 13:57:18  . . . . Segger_read_debug_port_register
2020-Jul-29 13:57:18  . . . . . Segger_coresight_configure
2020-Jul-29 13:57:18  . . . . Segger_read_debug_port_register:  JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:57:18  . . . . . Segger_abort_debug_action
2020-Jul-29 13:57:18  . . . . . Segger_abort_debug_action:      Attempting to clear any configuration errors in debug port before closing connection.

2020-Jul-29 13:57:18  . . . . . Segger_abort_debug_action:      JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:57:18  nRF_close_dll
2020-Jul-29 13:57:18  . nRF52_close
2020-Jul-29 13:57:18  . . Segger_is_connected_to_emu
2020-Jul-29 13:57:18  . . Segger_close
2020-Jul-29 13:57:18  . . . Segger_disconnect_from_emu
2020-Jul-29 13:57:18  . . . . Segger_disconnect_from_emu
2020-Jul-29 13:57:18  . . . . . Segger_is_connected_to_device
2020-Jul-29 13:57:18  . . . . . Segger_is_debug_region_powered
2020-Jul-29 13:57:18  . . . . . . Segger_read_debug_port_register
2020-Jul-29 13:57:18  . . . . . . . Segger_write_debug_port_register
2020-Jul-29 13:57:18  . . . . . . . Segger_write_debug_port_register:   JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:57:18  . . . . . . . . Segger_abort_debug_action
2020-Jul-29 13:57:18  . . . . . . . . Segger_abort_debug_action:        Attempting to clear any configuration errors in debug port before closing connection.

2020-Jul-29 13:57:18  . . . . . . . . Segger_abort_debug_action:        JLinkARM.dll reported "-1", an unknown error.

2020-Jul-29 13:57:18  . . Segger_close: Freeing Library.

2020-Jul-29 13:57:18  nRF_close_dll:    Freeing Library.

JLinkExe

> JLinkExe
SEGGER J-Link Commander V6.82b (Compiled Jul 23 2020 16:45:46)
DLL version V6.82b, compiled Jul 23 2020 16:45:35

Connecting to J-Link via USB...O.K.
Firmware: J-Link EDU Mini V1 compiled Jul 17 2020 16:25:21
Hardware version: V1.00
S/N: 801018009
License(s): FlashBP, GDB
VTref=0.000V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: NRF52
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "NRF52" selected.


Connecting to target via SWD
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
Cannot connect to target.
J-Link>

OpenOCD

> openocd -c 'debug_level 3' -c 'interface jlink' -c 'transport select swd' -c 'source [find target/nrf52.cfg]' -c 'init'
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
User : 13 4 command.c:544 command_print(): debug_level: 3
Debug: 14 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_interface jlink
Debug: 15 4 command.c:143 script_debug(): command - interface ocd_interface jlink
Debug: 17 4 command.c:319 command_new(): BUG: command 'jlink' does not have the '.usage' field filled out
Debug: 18 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 19 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 20 5 command.c:319 command_new(): BUG: command 'jlink freemem' does not have the '.usage' field filled out
Debug: 21 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 22 5 command.c:319 command_new(): BUG: command 'jlink hwstatus' does not have the '.usage' field filled out
Debug: 23 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 24 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 25 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 26 5 command.c:319 command_new(): BUG: command 'jlink config' does not have the '.usage' field filled out
Debug: 27 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 28 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 29 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 30 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 31 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 32 5 command.c:319 command_new(): BUG: command 'config reset' does not have the '.usage' field filled out
Debug: 33 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 34 5 command.c:319 command_new(): BUG: command 'config write' does not have the '.usage' field filled out
Debug: 35 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 36 5 command.c:319 command_new(): BUG: command 'jlink emucom' does not have the '.usage' field filled out
Debug: 37 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 38 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 39 5 command.c:364 register_command_handler(): registering 'ocd_jlink'...
Debug: 40 5 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select swd
Debug: 41 5 command.c:143 script_debug(): command - ocd_transport ocd_transport select swd
Debug: 42 5 command.c:319 command_new(): BUG: command 'swd' does not have the '.usage' field filled out
Debug: 43 5 command.c:364 register_command_handler(): registering 'ocd_swd'...
User : 44 5 command.c:675 command_run_line(): swdUser : 45 5 command.c:677 command_run_line():
Debug: 46 5 configuration.c:82 find_file(): found /usr/bin/../share/openocd/scripts/target/nrf52.cfg
Debug: 47 6 configuration.c:82 find_file(): found /usr/bin/../share/openocd/scripts/target/swj-dp.tcl
Debug: 48 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 49 6 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Debug: 50 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 51 6 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Debug: 52 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 53 6 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Debug: 54 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 55 6 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Debug: 56 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_swd newdap nrf52 cpu -expected-id 0x2ba01477
Debug: 57 7 command.c:143 script_debug(): command - ocd_swd ocd_swd newdap nrf52 cpu -expected-id 0x2ba01477
Debug: 58 7 tcl.c:548 jim_newtap_cmd(): Creating New Tap, Chip: nrf52, Tap: cpu, Dotted: nrf52.cpu, 2 params
Debug: 59 7 core.c:1300 jtag_tap_init(): Created Tap: nrf52.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 60 7 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target create nrf52.cpu cortex_m -chain-position nrf52.cpu
Debug: 61 7 command.c:143 script_debug(): command - ocd_target ocd_target create nrf52.cpu cortex_m -chain-position nrf52.cpu
Debug: 62 7 target.c:1899 target_free_all_working_areas_restore(): freeing all working areas
Debug: 63 7 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 64 7 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 65 7 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 66 7 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 67 7 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 68 7 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 69 7 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 70 7 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 71 7 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 72 7 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 73 7 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 74 7 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 75 7 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 76 7 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 77 7 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 78 7 command.c:364 register_command_handler(): registering 'ocd_tpiu'...
Debug: 79 7 command.c:364 register_command_handler(): registering 'ocd_itm'...
Debug: 80 7 command.c:364 register_command_handler(): registering 'ocd_itm'...
Debug: 81 7 command.c:364 register_command_handler(): registering 'ocd_cortex_m'...
Debug: 82 7 command.c:364 register_command_handler(): registering 'ocd_cortex_m'...
Debug: 83 7 command.c:364 register_command_handler(): registering 'ocd_cortex_m'...
Debug: 84 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 85 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 86 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 87 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 88 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 89 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 90 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 91 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 92 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 93 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 94 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 95 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 96 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 97 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 98 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 99 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 100 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 101 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 102 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 103 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 104 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 105 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 106 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 107 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 108 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 109 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 110 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 111 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 112 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 113 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 114 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 115 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 116 8 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 117 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 118 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 119 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 120 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 121 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 122 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 123 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 124 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 125 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 126 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 127 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 128 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 129 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 130 9 command.c:364 register_command_handler(): registering 'ocd_nrf52.cpu'...
Debug: 131 9 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_adapter_khz 10000
Debug: 132 9 command.c:143 script_debug(): command - adapter_khz ocd_adapter_khz 10000
Debug: 134 9 core.c:1631 jtag_config_khz(): handle jtag khz
Debug: 135 9 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 136 9 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
User : 137 9 command.c:544 command_print(): adapter speed: 10000 kHz
Debug: 138 9 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 139 9 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Debug: 140 9 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_cortex_m reset_config sysresetreq
Debug: 141 9 command.c:143 script_debug(): command - ocd_cortex_m ocd_cortex_m reset_config sysresetreq
User : 143 9 command.c:544 command_print(): cortex_m reset_config sysresetreq
Debug: 144 9 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 145 9 command.c:143 script_debug(): command - init ocd_init
Debug: 147 9 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 148 9 command.c:143 script_debug(): command - ocd_target ocd_target init
Debug: 150 10 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target names
Debug: 151 10 command.c:143 script_debug(): command - ocd_target ocd_target names
Debug: 152 10 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_nrf52.cpu cget -event gdb-flash-erase-start
Debug: 153 10 command.c:143 script_debug(): command - ocd_nrf52.cpu ocd_nrf52.cpu cget -event gdb-flash-erase-start
Debug: 154 10 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_nrf52.cpu configure -event gdb-flash-erase-start reset init
Debug: 155 10 command.c:143 script_debug(): command - ocd_nrf52.cpu ocd_nrf52.cpu configure -event gdb-flash-erase-start reset init
Debug: 156 10 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_nrf52.cpu cget -event gdb-flash-write-end
Debug: 157 10 command.c:143 script_debug(): command - ocd_nrf52.cpu ocd_nrf52.cpu cget -event gdb-flash-write-end
Debug: 158 10 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_nrf52.cpu configure -event gdb-flash-write-end reset halt
Debug: 159 10 command.c:143 script_debug(): command - ocd_nrf52.cpu ocd_nrf52.cpu configure -event gdb-flash-write-end reset halt
Debug: 160 10 target.c:1324 handle_target_init_command(): Initializing targets...
Debug: 161 10 command.c:364 register_command_handler(): registering 'ocd_target_request'...
Debug: 162 10 command.c:364 register_command_handler(): registering 'ocd_trace'...
Debug: 163 10 command.c:364 register_command_handler(): registering 'ocd_trace'...
Debug: 164 10 command.c:364 register_command_handler(): registering 'ocd_fast_load_image'...
Debug: 165 10 command.c:364 register_command_handler(): registering 'ocd_fast_load'...
Debug: 166 11 command.c:364 register_command_handler(): registering 'ocd_profile'...
Debug: 167 11 command.c:364 register_command_handler(): registering 'ocd_virt2phys'...
Debug: 168 11 command.c:364 register_command_handler(): registering 'ocd_reg'...
Debug: 169 11 command.c:364 register_command_handler(): registering 'ocd_poll'...
Debug: 170 11 command.c:364 register_command_handler(): registering 'ocd_wait_halt'...
Debug: 171 11 command.c:364 register_command_handler(): registering 'ocd_halt'...
Debug: 172 11 command.c:364 register_command_handler(): registering 'ocd_resume'...
Debug: 173 11 command.c:364 register_command_handler(): registering 'ocd_reset'...
Debug: 174 11 command.c:364 register_command_handler(): registering 'ocd_soft_reset_halt'...
Debug: 175 11 command.c:364 register_command_handler(): registering 'ocd_step'...
Debug: 176 11 command.c:364 register_command_handler(): registering 'ocd_mdw'...
Debug: 177 11 command.c:364 register_command_handler(): registering 'ocd_mdh'...
Debug: 178 11 command.c:364 register_command_handler(): registering 'ocd_mdb'...
Debug: 179 11 command.c:364 register_command_handler(): registering 'ocd_mww'...
Debug: 180 11 command.c:364 register_command_handler(): registering 'ocd_mwh'...
Debug: 181 11 command.c:364 register_command_handler(): registering 'ocd_mwb'...
Debug: 182 11 command.c:364 register_command_handler(): registering 'ocd_bp'...
Debug: 183 11 command.c:364 register_command_handler(): registering 'ocd_rbp'...
Debug: 184 11 command.c:364 register_command_handler(): registering 'ocd_wp'...
Debug: 185 11 command.c:364 register_command_handler(): registering 'ocd_rwp'...
Debug: 186 11 command.c:364 register_command_handler(): registering 'ocd_load_image'...
Debug: 187 11 command.c:364 register_command_handler(): registering 'ocd_dump_image'...
Debug: 188 11 command.c:364 register_command_handler(): registering 'ocd_verify_image_checksum'...
Debug: 189 11 command.c:364 register_command_handler(): registering 'ocd_verify_image'...
Debug: 190 11 command.c:364 register_command_handler(): registering 'ocd_test_image'...
Debug: 191 11 command.c:364 register_command_handler(): registering 'ocd_reset_nag'...
Debug: 192 11 command.c:364 register_command_handler(): registering 'ocd_ps'...
Debug: 193 11 command.c:364 register_command_handler(): registering 'ocd_test_mem_access'...
Debug: 194 11 jlink.c:548 jlink_init(): Using libjaylink 0.1.0 (compiled with 0.1.0).
Debug: 195 26 jlink.c:530 jaylink_log_handler(): Found device (VID:PID = 1366:0101, bus:address = 001:053).
Debug: 196 27 jlink.c:530 jaylink_log_handler(): Device: USB address = 0.
Debug: 197 27 jlink.c:530 jaylink_log_handler(): Device: Serial number = 801018009.
Debug: 198 27 jlink.c:530 jaylink_log_handler(): Allocating new device instance.
Debug: 199 27 jlink.c:530 jaylink_log_handler(): Found 1 USB device(s).
Info : 200 27 jlink.c:589 jlink_init(): No device selected, using first device.
Debug: 201 27 jlink.c:530 jaylink_log_handler(): Trying to open device (bus:address = 001:053).
Debug: 202 27 jlink.c:530 jaylink_log_handler(): Using endpoint 81 (IN) and 02 (OUT).
Debug: 203 27 jlink.c:530 jaylink_log_handler(): Device opened successfully.
Debug: 204 27 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 1 / 2 bytes).
Debug: 205 27 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 206 27 jlink.c:530 jaylink_log_handler(): Received 2 bytes from device.
Debug: 207 27 jlink.c:530 jaylink_log_handler(): Read 2 bytes from buffer.
Debug: 208 27 jlink.c:530 jaylink_log_handler(): Starting read operation (length = 112 bytes).
Debug: 209 27 jlink.c:530 jaylink_log_handler(): Received 112 bytes from device.
Debug: 210 28 jlink.c:530 jaylink_log_handler(): Read 112 bytes from buffer.
Info : 211 28 jlink.c:652 jlink_init(): J-Link EDU Mini V1 compiled Jul 17 2020 16:25:21
Debug: 212 28 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 1 / 4 bytes).
Debug: 213 28 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 214 28 jlink.c:530 jaylink_log_handler(): Received 4 bytes from device.
Debug: 215 28 jlink.c:530 jaylink_log_handler(): Read 4 bytes from buffer.
Debug: 216 28 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 1 / 32 bytes).
Debug: 217 28 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 218 28 jlink.c:530 jaylink_log_handler(): Received 32 bytes from device.
Debug: 219 28 jlink.c:530 jaylink_log_handler(): Read 32 bytes from buffer.
Debug: 220 28 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 1 / 4 bytes).
Debug: 221 28 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 222 28 jlink.c:530 jaylink_log_handler(): Received 4 bytes from device.
Debug: 223 28 jlink.c:530 jaylink_log_handler(): Read 4 bytes from buffer.
Info : 224 28 jlink.c:693 jlink_init(): Hardware version: 1.00
Debug: 225 28 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 1 / 4 bytes).
Debug: 226 28 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 227 28 jlink.c:530 jaylink_log_handler(): Received 4 bytes from device.
Debug: 228 28 jlink.c:530 jaylink_log_handler(): Read 4 bytes from buffer.
Debug: 229 28 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 1 / 256 bytes).
Debug: 230 28 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 231 29 jlink.c:530 jaylink_log_handler(): Received 256 bytes from device.
Debug: 232 29 jlink.c:530 jaylink_log_handler(): Read 256 bytes from buffer.
Debug: 233 29 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 1 / 8 bytes).
Debug: 234 29 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 235 29 jlink.c:530 jaylink_log_handler(): Received 8 bytes from device.
Debug: 236 29 jlink.c:530 jaylink_log_handler(): Read 8 bytes from buffer.
Info : 237 29 jlink.c:734 jlink_init(): VTarget = 3.268 V
Debug: 238 29 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 14 / 76 bytes).
Debug: 239 29 jlink.c:530 jaylink_log_handler(): Sent 14 bytes to device.
Debug: 240 29 jlink.c:530 jaylink_log_handler(): Received 92 bytes from device.
Debug: 241 29 jlink.c:530 jaylink_log_handler(): Read 76 bytes from buffer.
Debug: 242 29 jlink.c:530 jaylink_log_handler(): Starting read operation (length = 16 bytes).
Debug: 243 29 jlink.c:530 jaylink_log_handler(): Last read operation left 16 bytes in the buffer.
Debug: 244 29 jlink.c:530 jaylink_log_handler(): Read 16 bytes from buffer.
Debug: 245 29 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 2 / 4 bytes).
Debug: 246 29 jlink.c:530 jaylink_log_handler(): Sent 2 bytes to device.
Debug: 247 29 jlink.c:530 jaylink_log_handler(): Received 4 bytes from device.
Debug: 248 29 jlink.c:530 jaylink_log_handler(): Read 4 bytes from buffer.
Debug: 249 29 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 2 / 4 bytes).
Debug: 250 29 jlink.c:530 jaylink_log_handler(): Sent 2 bytes to device.
Debug: 251 29 jlink.c:530 jaylink_log_handler(): Received 4 bytes from device.
Debug: 252 29 jlink.c:530 jaylink_log_handler(): Read 4 bytes from buffer.
Debug: 253 29 jlink.c:888 jlink_reset(): TRST: 0, SRST: 0.
Debug: 254 29 jlink.c:530 jaylink_log_handler(): Starting write operation (length = 1 bytes).
Debug: 255 29 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 256 29 jlink.c:530 jaylink_log_handler(): Starting write operation (length = 1 bytes).
Debug: 257 29 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 258 33 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 1 / 6 bytes).
Debug: 259 33 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 260 33 jlink.c:530 jaylink_log_handler(): Received 6 bytes from device.
Debug: 261 33 jlink.c:530 jaylink_log_handler(): Read 6 bytes from buffer.
Info : 262 33 jlink.c:343 jlink_speed(): Reduced speed from 10000 kHz to 4000 kHz (maximum).
Debug: 263 33 jlink.c:530 jaylink_log_handler(): Starting write operation (length = 3 bytes).
Debug: 264 33 jlink.c:530 jaylink_log_handler(): Sent 3 bytes to device.
Debug: 265 33 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 266 33 core.c:1601 adapter_khz_to_speed(): have interface set up
Debug: 267 33 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 1 / 6 bytes).
Debug: 268 33 jlink.c:530 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 269 33 jlink.c:530 jaylink_log_handler(): Received 6 bytes from device.
Debug: 270 33 jlink.c:530 jaylink_log_handler(): Read 6 bytes from buffer.
Info : 271 33 jlink.c:343 jlink_speed(): Reduced speed from 10000 kHz to 4000 kHz (maximum).
Debug: 272 33 jlink.c:530 jaylink_log_handler(): Starting write operation (length = 3 bytes).
Debug: 273 33 jlink.c:530 jaylink_log_handler(): Sent 3 bytes to device.
Debug: 274 33 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 275 33 core.c:1601 adapter_khz_to_speed(): have interface set up
Info : 276 33 core.c:1386 adapter_init(): clock speed 10000 kHz
Debug: 277 33 openocd.c:140 handle_init_command(): Debug Adapter init complete
Debug: 278 33 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport init
Debug: 279 33 command.c:143 script_debug(): command - ocd_transport ocd_transport init
Debug: 281 33 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 282 33 jlink.c:2041 jlink_swd_switch_seq(): JTAG-to-SWD
Debug: 283 33 jlink.c:2065 jlink_swd_run_queue(): Executing 2 queued transactions.
Debug: 284 33 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 60 / 29 bytes).
Debug: 285 33 jlink.c:530 jaylink_log_handler(): Wrote 4 bytes into buffer.
Debug: 286 33 jlink.c:530 jaylink_log_handler(): Wrote 28 bytes into buffer.
Debug: 287 33 jlink.c:530 jaylink_log_handler(): Buffer filled up with 28 bytes.
Debug: 288 33 jlink.c:530 jaylink_log_handler(): Sent 60 bytes to device.
Debug: 289 34 jlink.c:530 jaylink_log_handler(): Received 29 bytes from device.
Debug: 290 34 jlink.c:530 jaylink_log_handler(): Read 28 bytes from buffer.
Debug: 291 34 jlink.c:530 jaylink_log_handler(): Read 1 bytes from buffer.
Debug: 292 34 jlink.c:2089 jlink_swd_run_queue(): SWD ack not OK: 7 JUNK
Debug: 293 34 command.c:626 run_command(): Command failed with error code -4
User : 294 34 command.c:687 command_run_line(): in procedure 'init'
in procedure 'ocd_bouncer'
Debug: 295 34 command.c:626 run_command(): Command failed with error code -4
User : 296 34 command.c:687 command_run_line():
Debug: 297 34 jlink.c:530 jaylink_log_handler(): Starting write / read operation (length = 14 / 76 bytes).
Debug: 298 34 jlink.c:530 jaylink_log_handler(): Sent 14 bytes to device.
Debug: 299 34 jlink.c:530 jaylink_log_handler(): Received 92 bytes from device.
Debug: 300 34 jlink.c:530 jaylink_log_handler(): Read 76 bytes from buffer.
Debug: 301 34 jlink.c:530 jaylink_log_handler(): Starting read operation (length = 16 bytes).
Debug: 302 34 jlink.c:530 jaylink_log_handler(): Last read operation left 16 bytes in the buffer.
Debug: 303 34 jlink.c:530 jaylink_log_handler(): Read 16 bytes from buffer.
Debug: 304 34 jlink.c:530 jaylink_log_handler(): Closing device (bus:address = 001:053).
Debug: 305 34 jlink.c:530 jaylink_log_handler(): Device closed successfully.
Debug: 306 34 jlink.c:530 jaylink_log_handler(): Device destroyed (bus:address = 001:053).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment