On Windows the usb1 Python package installs the libusb1 dll within the usb1 module directory but can not locate it to create a backend unless the module directory is added to the system PATH environment variable.
This PR modifies the ApolloDebugger._find_device() static method to, on Windows, obtain the backend by passing the location of the installed libusb-1.0.dll to libusb1.get_backend() and then passing that backend to usb.core.find().
This PR also modifies the other usage of usb.core.find() in FlashBridgeConnectionto use ApolloDebugger._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!
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: https://github.com/greatscottgadgets/cynthion/pull/129