Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for missing usb backend in picoprobe #1128

Merged
merged 2 commits into from
Mar 31, 2021
Merged

Conversation

newbrain
Copy link
Collaborator

Preliminary Fix for #1126:

Catch the unhandled exception NoBackendError from pyusb.

It seems that I'm unable to eradicate libusb-win32 from my machines (tried some different methods).
So to test this I'll have to setup a clean VM/physical machine.
I will update here when done.

@lennvn: if not asking too much, could you please try it?

pyocd/probe/picoprobe.py Outdated Show resolved Hide resolved
@flit
Copy link
Member

flit commented Mar 31, 2021

This is the same approach used by both the STLink and CMSIS-DAPv2 plugins, so I'm sure it will work fine.

I really need to follow through with creating a Python package that wraps up the libusb library, so no separate install step is required.

- modified show_no_libusb_warning() message to include PicoProbe
- Use it instead of LOG.debug()
Copy link
Member

@flit flit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

You may want to add your copyright to common.py. It's a small change though, so I won't require it.

@newbrain newbrain marked this pull request as ready for review March 31, 2021 17:45
@flit flit merged commit e993ffa into pyocd:master Mar 31, 2021
@newbrain newbrain deleted the NoBackendFixPP branch March 31, 2021 17:56
@lennvn
Copy link
Contributor

lennvn commented Apr 1, 2021

Preliminary Fix for #1126:

Catch the unhandled exception NoBackendError from pyusb.

It seems that I'm unable to eradicate libusb-win32 from my machines (tried some different methods).
So to test this I'll have to setup a clean VM/physical machine.
I will update here when done.

@lennvn: if not asking too much, could you please try it?

I installed the latest dev version and no error occurred with command 'pyocd list'

@newbrain
Copy link
Collaborator Author

newbrain commented Apr 1, 2021

Thanks for following it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants