Debuigging SAMD21 XIAO with ATMEL ICE failed

hope somebody can help me:
I want to debug an SAMD21 XIAO board with an ATMEL ICE but I was not successful so far:


platform = atmelsam
board = seeed_xiao
framework = arduino
build_type = debug
monitor_port = COM7
monitor_speed = 115200
debug_tool = atmel-ice
upload_protocol = atmel-ice

Compiler output

Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Atmel SAM (8.2.0) > Seeeduino XIAO
HARDWARE: SAMD21G18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink)
 - framework-arduino-samd-seeed @ 1.8.4 
 - framework-cmsis @ 2.50400.181126 (5.4.0) 
 - framework-cmsis-atmel @ 1.2.2 
 - tool-openocd @ 3.1200.0 (12.0) 
 - toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 16 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Checking size .pio\build\seeed_xiao\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   7.4% (used 2412 bytes from 32768 bytes)
Flash: [=         ]   5.2% (used 13704 bytes from 262144 bytes)
Configuring upload protocol...
AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba
CURRENT: upload_protocol = atmel-ice
Uploading .pio\build\seeed_xiao\firmware.bin
xPack Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2023-01-30-15:04)
Licensed under GNU GPL v2
For bug reports, read
debug_level: 1

Error: unable to find a matching CMSIS-DAP device
** OpenOCD init failed **
shutdown command invoked

*** [upload] Error 1

Thanks a lot

Please download and open Zadig (, go to Options → List all devices. Is there a Atmel ICE / CMSIS-DAP device there? What drivers does Zadig show it to have loaded?

OpenOCD might want it to have WinUSB or Libusb drivers.

Thanks for support.
ATMEL ICE ist listed two times. One time as Gateway the other one CMSIS-DAP ( Interface 0). I tried all possible drivers for this but same result as shown above…

There are posts here where OpenOCD definitely picks up the CMSIS-DAP device. One post also says to close AtmelStudio, or Microchip IDE nowadays (claims the device maybe?).

Another point is the USB VID : PID. Although the post makes no mention of it, what does Zadig show for the VID:PID for the CMSIS-DAP device? OpenOCD does e.g. have the cmsis_dap_vid_pid 0x03eb 0x2141 command to expect that VID and PID.

Is what’s known to OpenOCD.

Otherwise it’ll look for a USB HID device that contains “CMSIS-DAP”.

This one again shows that the right drivers for the CMSIS-DAP should be HidUSB. The OpenOCD source code looks like it looks for the same thing.

Maybe you can set HidUSB drivers in Zadig or, uninstall the existing device driver in the Windows device manager again to get what Atmel Studio installed?

VID and PID is as “expected”: 0x03eb 0x2141 in Zadig HiDUSB is not available …

Mhm. Try to uninstall the drivers again in the Windows device manager (may need that “delete driver software” checkmark) and reuplug the device. Is Microchip Studio installed, too? What driver did it have initially for the CMSIS-DAP device?

After deinstallation of “USB-Verbundgerät” ( with mentioned VID/PID) and reconnect, the ATMEL ICE pops up at “Anschlüsse COM and LPT” as CMSIS-DAP on COM5 with a warning sign. update of driver doesn’t help
Zadig shows: usbser (v1.0.0.0)
(BTW: after WCID its a red cross- als in previous trials)