After pressing Stop Debugging (SHIFT+F5), arm-none-eabi-gdb.exe is still running. End Task does not help, neither does resetting the Zero.
In one instance I had a different set of errors:
-------------------------------------
Uploading 'Sketch3' to 'Arduino Zero (Programming Port) (arduino_zero_edbg)' using 'COM9'
Uploader started for board Arduino Zero (Programming Port) (arduino_zero_edbg)
Upload method will be: bootloader
Uploading via Bootloader
uino7\bin\openocd.exe -d2 -s duino7/share/openocd/scripts/" -f riants/arduino_zero/openocd_scripts/arduino_zero.cfg" -c "telnet_port disabled; program ch3.ino.bin} verify reset 0x2000; shutdown"
Open On-Chip Debugger 0.12.0 (2023-01-14-23:37)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html debug_level: 2
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: FW Version = 02.01.0157
Info : CMSIS-DAP: Serial# = OU3D5RJD677YO46I7TWW
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 400 kHz
Info : SWD DPIDR 0x0bc11477
Info : [at91samd21g18.cpu] Cortex-M0+ r0p1 processor detected
Info : [at91samd21g18.cpu] target has 4 breakpoints, 2 watchpoints
Info : starting gdb server for at91samd21g18.cpu on 3333
Info : Listening on port 3333 for gdb connections
Error: CMSIS-DAP command mismatch. Expected 0x5 received 0x3
Polling target at91samd21g18.cpu failed, trying to reexamine
Error: CMSIS-DAP command mismatch. Sent 0x3 received 0x5
Error: CMSIS-DAP command CMD_DISCONNECT failed.
Error: CMSIS-DAP command mismatch. Sent 0x12 received 0x2
Info : SWD DPIDR 0x0bc11477
Error: CMSIS-DAP transfer count mismatch: expected 5, got 1
Error: CMSIS-DAP transfer count mismatch: expected 1, got 5
Error: CMSIS-DAP transfer count mismatch: expected 1, got 5
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Error: CMSIS-DAP transfer count mismatch: expected 5, got 1
Error: CMSIS-DAP transfer count mismatch: expected 4, got 1
Info : [at91samd21g18.cpu] Cortex-M0+ r0p0 processor detected
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Error: CMSIS-DAP transfer count mismatch: expected 2, got 1
Error: CMSIS-DAP transfer count mismatch: expected 2, got 1
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Info : [at91samd21g18.cpu] target has 0 breakpoints, 0 watchpoints
Error: CMSIS-DAP transfer count mismatch: expected 3, got 5
Error: CMSIS-DAP transfer count mismatch: expected 5, got 3
Error: CMSIS-DAP transfer count mismatch: expected 5, got 3
Error: CMSIS-DAP transfer count mismatch: expected 2, got 4
Error: CMSIS-DAP transfer count mismatch: expected 4, got 5
Error: CMSIS-DAP transfer count mismatch: expected 1, got 5
Error: CMSIS-DAP transfer count mismatch: expected 5, got 2
Error: CMSIS-DAP transfer count mismatch: expected 1, got 4
Error: CMSIS-DAP transfer count mismatch: expected 1, got 5
Error: CMSIS-DAP transfer count mismatch: expected 3, got 1
Error: CMSIS-DAP transfer count mismatch: expected 5, got 1
Error: CMSIS-DAP command mismatch. Sent 0x10 received 0x5
Error: CMSIS-DAP command CMD_DAP_SWJ_PINS failed.
Error: CMSIS-DAP: Interface reset failed
Error: SRST error
[at91samd21g18.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x0000060c msp: 0x20007ffc
Error: CMSIS-DAP transfer count mismatch: expected 2, got 4
** Programming Started **
Error: CMSIS-DAP transfer count mismatch: expected 4, got 2
Error: Couldn't find part corresponding to DID 00000000
Error: auto_probe failed
embedded:startup.tcl:1516: Error: ** Programming Failed **
in procedure 'program'
The uploader process failed
in procedure 'program_error' called at file "embedded:startup.tcl", line 1581
at file "embedded:startup.tcl", line 1516
Error: CMSIS-DAP command mismatch. Sent 0x3 received 0x5
Error: CMSIS-DAP command CMD_DISCONNECT failed.
----------------------------------
Driver Could it be the driver? I opened Zadig, and it suggested this:
EDBG CMSIS-DAP (interface 0)
Driver HidUsb (v10.0.22621.819) -> WinUSB (v6.1.7600.16385)
USB cables I have also tried several different USB cables, with no changes to the behaviour. (And my Wilderness Labs Meadow F7 Feather arrived today, it works well in Visual Studio.)