ExpressLRS / ExpressLRS-Configurator

Cross platform configuration & build tool for the ExpressLRS radio link
GNU General Public License v3.0
595 stars 130 forks source link

can't flash the STlink #563

Closed StefaSi closed 1 year ago

StefaSi commented 1 year ago

Summary

I'm having problems flashing the Stlink with the expresslrs configurator. it says no backend avaialble, i put the code below, if anyone knows how to fix it please tell me

Traceback (most recent call last): File "runpy.py", line 196, in _run_module_as_main

File "runpy.py", line 86, in _run_code File "C:\Users\Fam. Frontali\AppData\Roaming\ExpressLRS Configurator\firmwares\cloud\ExpressLRS\ae9df3d202aa905358f0fdc1ca36718736ebdf38\firmware\flasher.pyz__main.py", line 3, in if name == 'main': File "C:\Users\Fam. Frontali\AppData\Roaming\ExpressLRS Configurator\firmwares\cloud\ExpressLRS\ae9df3d202aa905358f0fdc1ca36718736ebdf38\firmware\flasher.pyz_bootstrap__init__.py", line 253, in bootstrap File "C:\Users\Fam. Frontali\AppData\Roaming\ExpressLRS Configurator\firmwares\cloud\ExpressLRS\ae9df3d202aa905358f0fdc1ca36718736ebdf38\firmware\flasher.pyz_bootstrap\init__.py", line 38, in run

File "C:\Users\Fam. Frontali.shiv\flasher.pyz_c4e2c0434668a3bf0810d642c43d4b4704e95dde71b23b18c3b5977eb596b6fa\site-packages\binary_configurator.py", line 411, in main return binary_flash.upload(options, args) File "C:\Users\Fam. Frontali.shiv\flasher.pyz_c4e2c0434668a3bf0810d642c43d4b4704e95dde71b23b18c3b5977eb596b6fa\site-packages\binary_flash.py", line 192, in upload return upload_stm32_stlink(args, options) File "C:\Users\Fam. Frontali.shiv\flasher.pyz_c4e2c0434668a3bf0810d642c43d4b4704e95dde71b23b18c3b5977eb596b6fa\site-packages\binary_flash.py", line 55, in upload_stm32_stlink stlink = external.pystlink.PyStlink(verbosity=1) File "C:\Users\Fam. Frontali.shiv\flasher.pyz_c4e2c0434668a3bf0810d642c43d4b4704e95dde71b23b18c3b5977eb596b6fa\site-packages/external\pystlink\pystlink_api.py", line 42, in init self._connector = stlinkusb.StlinkUsbConnector(dbg=self._dbg, serial=self._serial, index=self._index) File "C:\Users\Fam. Frontali.shiv\flasher.pyz_c4e2c0434668a3bf0810d642c43d4b4704e95dde71b23b18c3b5977eb596b6fa\site-packages/external\pystlink\lib\stlinkusb.py", line 67, in init

devices = usb.core.find(find_all=True)

File "C:\Users\Fam. Frontali.shiv\flasher.pyz_c4e2c0434668a3bf0810d642c43d4b4704e95dde71b23b18c3b5977eb596b6fa\site-packages/external\usb\core.py", line 1309, in find raise NoBackendError('No backend available') usb.core.NoBackendError: No backend available

pkendall64 commented 1 year ago

It means that the USB drivers specifically libusb0.dll cannot be found. This error comes from the USB library that is used by pystlink, which is in turn used by the flashing code.

StefaSi commented 1 year ago

@pkendall64 and there is a way to fix it?

pkendall64 commented 1 year ago

From a bit of googling it looks like the Zadig program should fix the problem. You have to choose the WinUSB driver when running Zadig. Otherwise, you could try using the web-flasher, which does it all via the browser. It is linked from the front page of the documentation web-site https://www.expresslrs.org/

StefaSi commented 1 year ago

@pkendall64 ok thank you