pyocd / pyocd/pyOCD

CMSIS-DAP V1 Issue on Linux

Open
#1,892 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
560
Avg merge
1h 41m
Merged PRs (30d)
3

Description

This is a continuation of #1825

The issue above was fixed by correct parsing of HID descriptors. This issue seems to be somewhere else as it emits no relevant logs.
I have tried to set the backend though the env, but it made no difference.

Bus 001 Device 048: ID 1209:d003 Generic RV003 CMSIS-DAP V1.3
> ./pyocd --version
0.40.1.dev6+g46941d56b
> time ./pyocd list -vvvvvvvv -p
0000345 D Project directory: /home/bogdan/Downloads [session]
0000348 D [Errno 13] Access denied (insufficient permissions) while trying to interrogate a USB device (VID=3434 PID=0323). This can probably be remedied with a udev rule. See <https://github.com/pyocd/pyOCD/tree/master/udev> for help. [pyusb_backend]
0000366 D [Errno 13] Access denied (insufficient permissions) while trying to interrogate a USB device (VID=046d PID=c332). This can probably be remedied with a udev rule. See <https://github.com/pyocd/pyOCD/tree/master/udev> for help. [pyusb_backend]
0000366 D [Errno 13] Access denied (insufficient permissions) while trying to interrogate a USB device (VID=3434 PID=0323). This can probably be remedied with a udev rule. See <https://github.com/pyocd/pyOCD/tree/master/udev> for help. [pyusb_v2_backend]
0000367 D [Errno 13] Access denied (insufficient permissions) while trying to interrogate a USB device (VID=046d PID=c332). This can probably be remedied with a udev rule. See <https://github.com/pyocd/pyOCD/tree/master/udev> for help. [pyusb_v2_backend]
0000368 D [Errno 13] Access denied (insufficient permissions) while trying to interrogate a USB device (VID=3434 PID=0323). This can probably be remedied with a udev rule. See <https://github.com/pyocd/pyOCD/tree/master/udev> for help. [pyusb_backend]
0007639 C index out of range [__main__]
./pyocd list -vvvvvvvv -p  0.61s user 0.14s system 9% cpu 7.774 total

^^^^ none of these logs are related to my device as you can see from the VID:PID

Ive attached the capture for the same command as above, but filtered for only this usb device
pyocd.pcap.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing pyocd list -vvvvvvvv -p on Linux with the CMSIS-DAP V1 device and inspect USB discovery through the pyusb backends. Compare the verbose output with the attached capture and trace the source of the index out of range error. Done means the device is handled correctly without the crash and the relevant failure has a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.