Fix pyOCD Failing to Detect Some DAPLink Probes on Ubuntu

Troubleshooting and udev rule fix when pyOCD cannot detect certain custom DAPLink probes.

Hardware: https://oshwhub.com/xivn1987/daplink
Firmware: https://github.com/XIVN1987/DAPLink/tree/master

Similar issues may also happen on other non-official/custom DAPLink firmware builds.

Symptom

pyocd list may show either an unknown probe or no probe:

1
pyocd list

Sometimes only J-Link appears, or no available probes are reported, while the same DAPLink still works in Keil.

Fix Steps

  1. Check whether USB device is visible:
1
lsusb

If detected correctly, you should see something like XIVN1987 XV-Link CMSIS-DAP.

  1. Configure udev rules Reference: https://github.com/pyocd/pyOCD/tree/main/udev

Clone repository:

1
git clone https://github.com/pyocd/pyOCD.git

Rules are in:

1
2
cd pyOCD/udev/
ls -l

For this custom probe, add an explicit rule (or append to 50-cmsis-dap.rules):

1
2
# 2e3c:5021 XIVN1987 XV-Link CMSIS-DAP
SUBSYSTEM=="usb", ATTR{idVendor}=="2e3c", ATTR{idProduct}=="5021", MODE:="666"

The vendor/product IDs should match lsusb output.

Copy the updated rule file to /etc/udev/rules.d, then reload:

1
2
sudo udevadm control --reload
sudo udevadm trigger

After that, run:

1
pyocd list

You should now see the DAPLink probe listed correctly.

记录并分享
Built with Hugo
Theme Stack designed by Jimmy