You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Kubuntu 24.04 PyOCD 0.36.0 was unable to find my STLINK/v2 debug probe using pyocd list. While running PyOCD through a debugger, it actually catches the problem in a try/except block:
@classmethoddef_usb_match(cls, dev):
try:
# Check VID/PID.isSTLink= (dev.idVendor==cls.USB_VID) and (dev.idProductincls.USB_PID_EP_MAP)
# Try accessing the current config, which will cause a permission error on Linux. Better# to error out here than later when building the device description. For Windows we# don't need to worry about device permissions, but reading descriptors requires special# handling due to the libusb bug described in __init__().ifisSTLinkandplatform.system() !="Windows":
dev.get_active_configuration()
returnisSTLinkexceptusb.core.USBErroraserror:
iferror.errno==errno.EACCESandplatform.system() =="Linux" \
andcommon.should_show_libusb_device_error((dev.idVendor, dev.idProduct)):
# We've already checked that this is an STLink device by VID/PID, so we# can use a warning log level to let the user know it's almost certainly# a permissions issue.LOG.warning("%s while trying to get the STLink USB device configuration ""(VID=%04x PID=%04x). This can probably be remedied with a udev rule. ""See <https://github.com/pyocd/pyOCD/tree/master/udev> for help.",
error, dev.idVendor, dev.idProduct)
returnFalseexcept (IndexError, NotImplementedError, ValueError) aserror:
returnFalse
The udev rules are mentioned in the readme.md, but it would be nice to have the actual error being displayed as a warning in CLI when running a command like pyocd list.
The text was updated successfully, but these errors were encountered:
On Kubuntu 24.04 PyOCD 0.36.0 was unable to find my STLINK/v2 debug probe using
pyocd list
. While running PyOCD through a debugger, it actually catches the problem in a try/except block:.venv/lib/python3.12/site-packages/pyocd/probe/stlink/usb.py
The
udev
rules are mentioned in thereadme.md
, but it would be nice to have the actual error being displayed as a warning in CLI when running a command likepyocd list
.The text was updated successfully, but these errors were encountered: