I just checked again on that machine and now the fault does not occur. That is unfortunate because it is difficult to perform any investigation when I can't personally reproduce the fault.
I did see one report of a possible solution:
I did experience the same problem with the Zero board a the time I was having it with the UNO R4 WiFi, so the fact that the topic is about a Zero does not necessarily mean it is irrelevant.
However, I'm not sure the problem reported in that forum topic is the same one you are experiencing (which I also experienced). I say this because the error message shared in that topic consists only of:
Error: unable to open CMSIS-DAP device 0x3eb:0x2157
whereas the error message we encountered has an additional error:
(note the presence of the "unable to find a matching CMSIS-DAP device" error)
but maybe it is worth giving OpenOCD 0.12.0 a try, lacking any better ideas.
I can't vouch for the link provided in that topic as a source of OpenOCD. I would suggest instead obtaining it from the link under the "Assets" section of the release in the official OpenOCD GitHub repository:
or the one distributed by Arduino:
https://downloads.arduino.cc/tools/openocd-0.12.0-arduino1-static-i686-w64-mingw32.tar.bz2
I think the most simple way to try it out will be to replace the installation of the openocd@0.11.0-arduino2 tool with the 0.12.0 version:
- Rename the folder at the following path on your hard drive:
C:\Users\micro\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.11.0-arduino2 - Download the OpenOCD 0.12.0 archive.
- Extract the downloaded file.
- Rename the extracted folder to
0.11.0-arduino2 - Copy the folder to the following location on your hard drive:
C:\Users\micro\AppData\Local\Arduino15\packages\arduino\tools\openocd
Then try using the debugger once again.
After performing the experiment, you can put everything back how it was before:
- Delete the folder at the following path on your hard drive:
C:\Users\micro\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.11.0-arduino2 - Change the name of the folder you renamed during step (1) of the instructions back to
0.11.0-arduino2.