On Windows, create the libusb1 backend explicitly by specifying the installed location of libusb-1.0.dll #101
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Windows the
usb1
Python package installs the libusb1 dll within theusb1
module directory but can not locate it to create a backend unless the module directory is added to the systemPATH
environment variable.This PR modifies the
ApolloDebugger._find_device()
static method to, on Windows, obtain the backend by passing the location of the installedlibusb-1.0.dll
tolibusb1.get_backend()
and then passing that backend tousb.core.find()
.This PR also modifies the other usage of
usb.core.find()
inFlashBridgeConnection
to useApolloDebugger._find_device()
instead.It's important to note that, for future work on Apollo, the
usb.core.find()
method should no longer be used if Windows compatibility is to be maintained!This is a companion PR to the one in Cynthion: greatscottgadgets/cynthion#129