I am having trouble with using openocd with the XIAO platform.
I have read through the other openocd-related posts on this forum and they don’t address this particular issue.
First, here is my openocd configuration file (openocd.cfg) for use with a Segger J-Link debugger:
The openocd.cfg file was modified with one line to change the interface:
source [find interface/jlink.cfg]
transport select "swd"
# chip name
set CHIPNAME at91samd51g18
set _CPUTAPID 0x0bc11477
debug_level 4
set telnet_port 0
source [find target/at91samdXX.cfg]
Here is a log of what I get when I run “openocd -f openocd.cfg”.
Open On-Chip Debugger 0.10.0+dev-01340-ga0e8edc4e (2020-03-12-18:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Debug: 14 1 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/target/at91samdXX.cfg
Debug: 15 1 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/target/swj-dp.tcl
Debug: 16 1 command.c:143 script_debug(): command - transport transport select
Debug: 17 1 command.c:143 script_debug(): command - transport transport select
Debug: 18 1 command.c:143 script_debug(): command - transport transport select
Debug: 19 1 command.c:143 script_debug(): command - transport transport select
Debug: 20 1 command.c:143 script_debug(): command - swd swd newdap at91samd51g18 cpu -irlen 4 -expected-id 0x4ba00477
Debug: 21 1 tcl.c:567 jim_newtap_cmd(): Creating New Tap, Chip: at91samd51g18, Tap: cpu, Dotted: at91samd51g18.cpu, 4 params
Debug: 22 1 core.c:1487 jtag_tap_init(): Created Tap: at91samd51g18.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 23 1 command.c:143 script_debug(): command - dap dap create at91samd51g18.dap -chain-position at91samd51g18.cpu
Debug: 24 1 command.c:354 register_command_handler(): registering 'at91samd51g18.dap'...
Debug: 25 1 command.c:354 register_command_handler(): registering 'at91samd51g18.dap'...
Debug: 26 1 command.c:354 register_command_handler(): registering 'at91samd51g18.dap'...
Debug: 27 1 command.c:354 register_command_handler(): registering 'at91samd51g18.dap'...
Debug: 28 1 command.c:354 register_command_handler(): registering 'at91samd51g18.dap'...
Debug: 29 1 command.c:354 register_command_handler(): registering 'at91samd51g18.dap'...
Debug: 30 1 command.c:354 register_command_handler(): registering 'at91samd51g18.dap'...
Debug: 31 1 command.c:354 register_command_handler(): registering 'at91samd51g18.dap'...
Debug: 32 1 command.c:354 register_command_handler(): registering 'at91samd51g18.dap'...
Debug: 33 1 command.c:143 script_debug(): command - target target create at91samd51g18.cpu cortex_m -endian little -dap at91samd51g18.dap
Debug: 34 1 command.c:354 register_command_handler(): registering 'arm'...
Debug: 35 1 command.c:354 register_command_handler(): registering 'arm'...
Debug: 36 1 command.c:354 register_command_handler(): registering 'arm'...
Debug: 37 1 command.c:354 register_command_handler(): registering 'arm'...
Debug: 38 1 command.c:354 register_command_handler(): registering 'arm'...
Debug: 39 1 command.c:354 register_command_handler(): registering 'arm'...
Debug: 40 1 command.c:354 register_command_handler(): registering 'arm'...
Debug: 41 1 command.c:354 register_command_handler(): registering 'arm'...
Debug: 42 1 command.c:354 register_command_handler(): registering 'arm'...
Debug: 43 1 command.c:354 register_command_handler(): registering 'tpiu'...
Debug: 44 1 command.c:354 register_command_handler(): registering 'itm'...
Debug: 45 1 command.c:354 register_command_handler(): registering 'itm'...
Debug: 46 1 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 47 1 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 48 1 command.c:354 register_command_handler(): registering 'cortex_m'...
Debug: 49 1 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 50 1 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 51 1 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 52 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 53 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 54 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 55 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 56 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 57 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 58 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 59 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 60 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 61 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 62 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 63 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 64 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 65 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 66 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 67 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 68 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 69 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 70 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 71 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 72 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 73 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 74 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 75 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 76 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 77 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 78 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 79 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 80 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 81 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 82 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 83 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 84 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 85 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 86 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 87 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 88 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 89 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 90 2 command.c:354 register_command_handler(): registering 'at91samd51g18.cpu'...
Debug: 91 2 command.c:143 script_debug(): command - at91samd51g18.cpu at91samd51g18.cpu configure -work-area-phys 0x20000000 -work-area-size 0x800 -work-area-backup 0
Debug: 92 2 target.c:1969 target_free_all_working_areas_restore(): freeing all working areas
Debug: 93 2 target.c:1969 target_free_all_working_areas_restore(): freeing all working areas
Debug: 94 2 target.c:1969 target_free_all_working_areas_restore(): freeing all working areas
Debug: 95 2 command.c:143 script_debug(): command - at91samd51g18.cpu at91samd51g18.cpu configure -event reset-deassert-post
at91samd dsu_reset_deassert
Debug: 96 2 command.c:143 script_debug(): command - reset_config reset_config srst_gates_jtag
Debug: 98 2 command.c:143 script_debug(): command - adapter_khz adapter_khz 400
Debug: 100 2 core.c:1821 jtag_config_khz(): handle jtag khz
Debug: 101 2 core.c:1784 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 102 2 core.c:1784 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 103 2 command.c:143 script_debug(): command - transport transport select
Debug: 104 2 command.c:143 script_debug(): command - cortex_m cortex_m reset_config sysresetreq
Debug: 106 2 command.c:143 script_debug(): command - flash flash bank at91samd51g18.flash at91samd 0x00000000 0 1 1 at91samd51g18.cpu
Debug: 108 2 command.c:354 register_command_handler(): registering 'at91samd'...
Debug: 109 2 command.c:354 register_command_handler(): registering 'at91samd'...
Debug: 110 2 command.c:354 register_command_handler(): registering 'at91samd'...
Debug: 111 2 command.c:354 register_command_handler(): registering 'at91samd'...
Debug: 112 2 command.c:354 register_command_handler(): registering 'at91samd'...
Debug: 113 2 command.c:354 register_command_handler(): registering 'at91samd'...
Debug: 114 2 command.c:354 register_command_handler(): registering 'at91samd'...
Debug: 115 2 tcl.c:1156 handle_flash_bank_command(): 'at91samd' driver usage field missing
Info : 116 2 server.c:311 add_service(): Listening on port 6666 for tcl connections
Info : 117 2 server.c:311 add_service(): Listening on port 4444 for telnet connections
Debug: 118 2 command.c:143 script_debug(): command - init init
Debug: 120 2 command.c:143 script_debug(): command - target target init
Debug: 122 2 command.c:143 script_debug(): command - target target names
Debug: 123 2 command.c:143 script_debug(): command - at91samd51g18.cpu at91samd51g18.cpu cget -event gdb-flash-erase-start
Debug: 124 2 command.c:143 script_debug(): command - at91samd51g18.cpu at91samd51g18.cpu configure -event gdb-flash-erase-start reset init
Debug: 125 2 command.c:143 script_debug(): command - at91samd51g18.cpu at91samd51g18.cpu cget -event gdb-flash-write-end
Debug: 126 2 command.c:143 script_debug(): command - at91samd51g18.cpu at91samd51g18.cpu configure -event gdb-flash-write-end reset halt
Debug: 127 2 command.c:143 script_debug(): command - at91samd51g18.cpu at91samd51g18.cpu cget -event gdb-attach
Debug: 128 2 command.c:143 script_debug(): command - at91samd51g18.cpu at91samd51g18.cpu configure -event gdb-attach halt
Debug: 129 2 target.c:1431 handle_target_init_command(): Initializing targets...
Debug: 130 2 semihosting_common.c:97 semihosting_common_init():
Debug: 131 2 command.c:354 register_command_handler(): registering 'target_request'...
Debug: 132 2 command.c:354 register_command_handler(): registering 'trace'...
Debug: 133 3 command.c:354 register_command_handler(): registering 'trace'...
Debug: 134 3 command.c:354 register_command_handler(): registering 'fast_load_image'...
Debug: 135 3 command.c:354 register_command_handler(): registering 'fast_load'...
Debug: 136 3 command.c:354 register_command_handler(): registering 'profile'...
Debug: 137 3 command.c:354 register_command_handler(): registering 'virt2phys'...
Debug: 138 3 command.c:354 register_command_handler(): registering 'reg'...
Debug: 139 3 command.c:354 register_command_handler(): registering 'poll'...
Debug: 140 3 command.c:354 register_command_handler(): registering 'wait_halt'...
Debug: 141 3 command.c:354 register_command_handler(): registering 'halt'...
Debug: 142 3 command.c:354 register_command_handler(): registering 'resume'...
Debug: 143 3 command.c:354 register_command_handler(): registering 'reset'...
Debug: 144 3 command.c:354 register_command_handler(): registering 'soft_reset_halt'...
Debug: 145 3 command.c:354 register_command_handler(): registering 'step'...
Debug: 146 3 command.c:354 register_command_handler(): registering 'mdd'...
Debug: 147 3 command.c:354 register_command_handler(): registering 'mdw'...
Debug: 148 3 command.c:354 register_command_handler(): registering 'mdh'...
Debug: 149 3 command.c:354 register_command_handler(): registering 'mdb'...
Debug: 150 3 command.c:354 register_command_handler(): registering 'mwd'...
Debug: 151 3 command.c:354 register_command_handler(): registering 'mww'...
Debug: 152 3 command.c:354 register_command_handler(): registering 'mwh'...
Debug: 153 3 command.c:354 register_command_handler(): registering 'mwb'...
Debug: 154 3 command.c:354 register_command_handler(): registering 'bp'...
Debug: 155 3 command.c:354 register_command_handler(): registering 'rbp'...
Debug: 156 3 command.c:354 register_command_handler(): registering 'wp'...
Debug: 157 3 command.c:354 register_command_handler(): registering 'rwp'...
Debug: 158 3 command.c:354 register_command_handler(): registering 'load_image'...
Debug: 159 3 command.c:354 register_command_handler(): registering 'dump_image'...
Debug: 160 3 command.c:354 register_command_handler(): registering 'verify_image_checksum'...
Debug: 161 3 command.c:354 register_command_handler(): registering 'verify_image'...
Debug: 162 3 command.c:354 register_command_handler(): registering 'test_image'...
Debug: 163 3 command.c:354 register_command_handler(): registering 'reset_nag'...
Debug: 164 3 command.c:354 register_command_handler(): registering 'ps'...
Debug: 165 3 command.c:354 register_command_handler(): registering 'test_mem_access'...
Debug: 166 3 jlink.c:572 jlink_init(): Using libjaylink 0.2.0-git-f73ad5e (compiled with 0.2.0-git-f73ad5e).
Debug: 167 6 jlink.c:526 jaylink_log_handler(): Found device (VID:PID = 1366:0101, bus:address = 001:028).
Debug: 168 7 jlink.c:526 jaylink_log_handler(): Device: USB address = 0.
Debug: 169 7 jlink.c:526 jaylink_log_handler(): Device: Serial number = 260102401.
Debug: 170 7 jlink.c:526 jaylink_log_handler(): Allocating new device instance.
Debug: 171 7 jlink.c:526 jaylink_log_handler(): Found 1 USB device(s).
Debug: 172 7 jlink.c:526 jaylink_log_handler(): Trying to open device (bus:address = 001:028).
Debug: 173 7 jlink.c:526 jaylink_log_handler(): Using endpoint 81 (IN) and 01 (OUT).
Debug: 174 8 jlink.c:526 jaylink_log_handler(): Device opened successfully.
Debug: 175 8 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 1 / 2 bytes).
Debug: 176 8 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 177 9 jlink.c:526 jaylink_log_handler(): Received 2 bytes from device.
Debug: 178 9 jlink.c:526 jaylink_log_handler(): Read 2 bytes from buffer.
Debug: 179 9 jlink.c:526 jaylink_log_handler(): Starting read operation (length = 112 bytes).
Debug: 180 9 jlink.c:526 jaylink_log_handler(): Received 112 bytes from device.
Debug: 181 9 jlink.c:526 jaylink_log_handler(): Read 112 bytes from buffer.
Info : 182 9 jlink.c:696 jlink_init(): J-Link V10 compiled Mar 21 2019 15:43:57
Debug: 183 9 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 1 / 4 bytes).
Debug: 184 10 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 185 10 jlink.c:526 jaylink_log_handler(): Received 4 bytes from device.
Debug: 186 10 jlink.c:526 jaylink_log_handler(): Read 4 bytes from buffer.
Debug: 187 10 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 1 / 32 bytes).
Debug: 188 11 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 189 11 jlink.c:526 jaylink_log_handler(): Received 32 bytes from device.
Debug: 190 11 jlink.c:526 jaylink_log_handler(): Read 32 bytes from buffer.
Debug: 191 11 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 1 / 4 bytes).
Debug: 192 12 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 193 12 jlink.c:526 jaylink_log_handler(): Received 4 bytes from device.
Debug: 194 12 jlink.c:526 jaylink_log_handler(): Read 4 bytes from buffer.
Info : 195 12 jlink.c:737 jlink_init(): Hardware version: 10.10
Debug: 196 12 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 1 / 4 bytes).
Debug: 197 12 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 198 13 jlink.c:526 jaylink_log_handler(): Received 4 bytes from device.
Debug: 199 13 jlink.c:526 jaylink_log_handler(): Read 4 bytes from buffer.
Debug: 200 13 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 1 / 256 bytes).
Debug: 201 13 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 202 14 jlink.c:526 jaylink_log_handler(): Received 256 bytes from device.
Debug: 203 14 jlink.c:526 jaylink_log_handler(): Read 256 bytes from buffer.
Debug: 204 14 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 1 / 8 bytes).
Debug: 205 14 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 206 15 jlink.c:526 jaylink_log_handler(): Received 8 bytes from device.
Debug: 207 15 jlink.c:526 jaylink_log_handler(): Read 8 bytes from buffer.
Info : 208 15 jlink.c:779 jlink_init(): VTarget = 3.296 V
Debug: 209 15 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 14 / 76 bytes).
Debug: 210 15 jlink.c:526 jaylink_log_handler(): Sent 14 bytes to device.
Debug: 211 16 jlink.c:526 jaylink_log_handler(): Received 92 bytes from device.
Debug: 212 16 jlink.c:526 jaylink_log_handler(): Read 76 bytes from buffer.
Debug: 213 16 jlink.c:526 jaylink_log_handler(): Starting read operation (length = 16 bytes).
Debug: 214 16 jlink.c:526 jaylink_log_handler(): Last read operation left 16 bytes in the buffer.
Debug: 215 16 jlink.c:526 jaylink_log_handler(): Read 16 bytes from buffer.
Debug: 216 16 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 2 / 4 bytes).
Debug: 217 16 jlink.c:526 jaylink_log_handler(): Sent 2 bytes to device.
Debug: 218 16 jlink.c:526 jaylink_log_handler(): Received 4 bytes from device.
Debug: 219 16 jlink.c:526 jaylink_log_handler(): Read 4 bytes from buffer.
Debug: 220 16 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 2 / 4 bytes).
Debug: 221 17 jlink.c:526 jaylink_log_handler(): Sent 2 bytes to device.
Debug: 222 17 jlink.c:526 jaylink_log_handler(): Received 4 bytes from device.
Debug: 223 17 jlink.c:526 jaylink_log_handler(): Read 4 bytes from buffer.
Debug: 224 17 jlink.c:931 jlink_reset(): TRST: 0, SRST: 0.
Debug: 225 17 jlink.c:526 jaylink_log_handler(): Starting write operation (length = 1 bytes).
Debug: 226 17 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 227 17 jlink.c:526 jaylink_log_handler(): Starting write operation (length = 1 bytes).
Debug: 228 18 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 229 21 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 1 / 6 bytes).
Debug: 230 21 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 231 22 jlink.c:526 jaylink_log_handler(): Received 6 bytes from device.
Debug: 232 22 jlink.c:526 jaylink_log_handler(): Read 6 bytes from buffer.
Debug: 233 22 jlink.c:526 jaylink_log_handler(): Starting write operation (length = 3 bytes).
Debug: 234 22 jlink.c:526 jaylink_log_handler(): Sent 3 bytes to device.
Debug: 235 22 core.c:1784 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 236 22 core.c:1788 adapter_khz_to_speed(): have interface set up
Debug: 237 22 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 1 / 6 bytes).
Debug: 238 22 jlink.c:526 jaylink_log_handler(): Sent 1 bytes to device.
Debug: 239 23 jlink.c:526 jaylink_log_handler(): Received 6 bytes from device.
Debug: 240 23 jlink.c:526 jaylink_log_handler(): Read 6 bytes from buffer.
Debug: 241 23 jlink.c:526 jaylink_log_handler(): Starting write operation (length = 3 bytes).
Debug: 242 23 jlink.c:526 jaylink_log_handler(): Sent 3 bytes to device.
Debug: 243 23 core.c:1784 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 244 23 core.c:1788 adapter_khz_to_speed(): have interface set up
Info : 245 23 core.c:1564 adapter_init(): clock speed 400 kHz
Debug: 246 23 openocd.c:141 handle_init_command(): Debug Adapter init complete
Debug: 247 23 command.c:143 script_debug(): command - transport transport init
Debug: 249 23 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 250 23 command.c:143 script_debug(): command - dap dap init
Debug: 252 23 arm_dap.c:106 dap_init_all(): Initializing all DAPs ...
Debug: 253 23 jlink.c:2143 jlink_swd_switch_seq(): JTAG-to-SWD
Debug: 254 23 jlink.c:2167 jlink_swd_run_queue(): Executing 2 queued transactions.
Debug: 255 23 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 64 / 31 bytes).
Debug: 256 23 jlink.c:526 jaylink_log_handler(): Wrote 4 bytes into buffer.
Debug: 257 23 jlink.c:526 jaylink_log_handler(): Wrote 30 bytes into buffer.
Debug: 258 23 jlink.c:526 jaylink_log_handler(): Buffer filled up with 30 bytes.
Debug: 259 24 jlink.c:526 jaylink_log_handler(): Sent 64 bytes to device.
Debug: 260 24 jlink.c:526 jaylink_log_handler(): Received 30 bytes from device.
Debug: 261 24 jlink.c:526 jaylink_log_handler(): Read 30 bytes from buffer.
Debug: 262 25 jlink.c:526 jaylink_log_handler(): Received 1 bytes from device.
Debug: 263 25 jlink.c:526 jaylink_log_handler(): Read 1 bytes from buffer.
Debug: 264 25 jlink.c:2192 jlink_swd_run_queue(): SWD ack not OK: 0 JUNK
Debug: 265 25 command.c:629 run_command(): Command 'dap init' failed with error code -4
User : 266 25 command.c:694 command_run_line():
Debug: 267 25 command.c:629 run_command(): Command 'init' failed with error code -4
User : 268 25 command.c:694 command_run_line():
Debug: 269 25 target.c:1969 target_free_all_working_areas_restore(): freeing all working areas
Debug: 270 25 jlink.c:2148 jlink_swd_switch_seq(): SWD-to-JTAG
Debug: 271 25 jlink.c:2167 jlink_swd_run_queue(): Executing 0 queued transactions.
Debug: 272 25 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 26 / 12 bytes).
Debug: 273 25 jlink.c:526 jaylink_log_handler(): Wrote 4 bytes into buffer.
Debug: 274 25 jlink.c:526 jaylink_log_handler(): Wrote 11 bytes into buffer.
Debug: 275 25 jlink.c:526 jaylink_log_handler(): Buffer filled up with 11 bytes.
Debug: 276 25 jlink.c:526 jaylink_log_handler(): Sent 26 bytes to device.
Debug: 277 25 jlink.c:526 jaylink_log_handler(): Received 11 bytes from device.
Debug: 278 25 jlink.c:526 jaylink_log_handler(): Read 11 bytes from buffer.
Debug: 279 26 jlink.c:526 jaylink_log_handler(): Received 1 bytes from device.
Debug: 280 26 jlink.c:526 jaylink_log_handler(): Read 1 bytes from buffer.
Debug: 281 26 jlink.c:526 jaylink_log_handler(): Starting write / read operation (length = 14 / 76 bytes).
Debug: 282 26 jlink.c:526 jaylink_log_handler(): Sent 14 bytes to device.
Debug: 283 26 jlink.c:526 jaylink_log_handler(): Received 92 bytes from device.
Debug: 284 26 jlink.c:526 jaylink_log_handler(): Read 76 bytes from buffer.
Debug: 285 26 jlink.c:526 jaylink_log_handler(): Starting read operation (length = 16 bytes).
Debug: 286 26 jlink.c:526 jaylink_log_handler(): Last read operation left 16 bytes in the buffer.
Debug: 287 26 jlink.c:526 jaylink_log_handler(): Read 16 bytes from buffer.
Debug: 288 26 jlink.c:526 jaylink_log_handler(): Closing device (bus:address = 001:028).
Debug: 289 26 jlink.c:526 jaylink_log_handler(): Device closed successfully.
Debug: 290 26 jlink.c:526 jaylink_log_handler(): Device destroyed (bus:address = 001:028).
Notice that there is apparently one command that the target does not respond to with an ACK, after responding with ACKs to a lot of previous commands.
I have tried a number of different configurations, but I keep getting blocked by this.
I have also tried using a CMSIS-DAP debugger instead of the J-Link.
I have tried this on three different XIAOs, right out of the box, and I get the same result. Meanwhile, I can access other SAMD21 target boards using the same setup with no problem.
Any ideas?
Thanks.
–ken