Comments (16)
Hello Fahad, thanks for reporting, but please provide more informations like what OS do you have, version of python, if you have all drivers installed, some debug info -d
and so. Thanks.
from pystlink.
I am using windows 10, python 3.6. I installed pyusb. Downloaded libusb from here (your link isn't working) and copied libusb-1.0.dll into Windows/System32 directory. -d
doen't provide anything apart from the "*** ST-Link/V2 is not connected ***" error.
Hope this helps.
from pystlink.
You also need installed ST-Link utility this utility also contain driver for ST-Link and this is necessary for running under windows, I looking that I forgot to mention about this in README.
from pystlink.
I have that installed. I mentioned in my first post that ST-Link Utility can detect the ST-Link/V2.
from pystlink.
I meet the same issue.And I use Windows10 and Python3.5.I used to use ST-Link to program SM32.I cloned pystlink and libusb from github,and compiled libusb-1.0.dll with VS.I am confused ablout what I did wrong.
from pystlink.
I know why it is fail to connect to ST-Link/V2,because ST-Link/V2 use STM32 drive program instead of libusb drive program,we should change the drive program to libusb.I program flash successfully several times but failed many times with "*** Error unlocking FLASH ***".I haven't figured out it.
from pystlink.
I have figured out the error. :-) I add a 100ms delay before unlock the flash,and try to unlock the flash again between eraseing and flashing.After that,it work well.
from pystlink.
I know why it is fail to connect to ST-Link/V2,because ST-Link/V2 use STM32 drive program instead of libusb drive program,we should change the drive program to libusb.I program flash successfully several times but failed many times with "*** Error unlocking FLASH ***".I haven't figured out it.
I am facing the same problem(*** ST-Link/V2 is not connected ***). How did you handle this problem, can you explain it a little bir more detailed.
from pystlink.
You can try following steps:
if your system is 64bit windows, need copy MS32\dll\libusb-1.0.dll to C:\Windows\SysWOW64. or just add MS32\dll to your %path% env.
from pystlink.
I am facing the same problem(*** ST-Link/V2 is not connected ***). How did you handle this problem, can you explain it a little bir more detailed.
In fact,I almost forget what I did.Emmm,you can use Zadig to replace the driver of st-link easlly.
from pystlink.
Apparently the ST-Link official driver (STSW-LINK009) is just WinUSB. There's no need to replace the driver with Zadig, as it is compatible with libusb (STSW-LINK009 version 2.0.1; libusb version 1.0.22). The libusb-1.0.dll does not need to be copied to Windows directory. Copying libusb-1.0.dll to the Python installation directory (same directory where python.exe is located) is enough.
from pystlink.
ST-Link driver is needed only to have right .inf file for USB Device.
All what you need on Windows is libusb1.dll and pyusb (I prefer 64bit python and also libusb1)
from pystlink.
Using 32bit Python solved my problem. Initially I thought it was something related to the python version, but doing some experiments here I saw that it was the architecture. Now I need only to have libusb-1.0.dll in the same folder of the program and it works without this error.
from pystlink.
In 2022 the problems continue to happen. Does anyone have a solution for this?
from pystlink.
I had the same problem and I managed to solve it. In my case, I have
- Windows 11
- Python 3.10
- The STM32 drivers were already installed since I usually use STM32CubeIDE to program NUCLEOS using ST-LINK/V2.
First, I tried downloading and copying libusb-1.0.dll to path Windows/System32 but it didn't work for me (*** ST-Link/V2 is not connected ***).
To make it recognize, I had to load the libusb-win32 (v1.2.6.0) driver that comes by default to install with the Zadig program (https://zadig.akeo.ie/). Using this program, I selected the ST-LINK Debug device and replaced the driver. Now the python works.
However, the programmer of the STM32CubeIDE does not work, you should go back to the previous version of the driver for it to work again. You can do this by reverting to the previous driver in Device Manager > select device > Driver. Or you can also do: Device Manager > select device (right click) > Update Driver > Browse my PC for drivers > Choose from a list of available drivers > Choose STMicroelectronics STLink dongle.
I think there is no way to use two programs twice without doing instalation of the proper driver for each program.
from pystlink.
Related Issues (20)
- Would it be possible to extend this program to access STM8's? HOT 3
- pystlink as a library HOT 2
- question: nu-link programmer HOT 1
- getting I/O error(13): Permission denied while flashing the new credentials into mcu through python
- STM32FP - direct flashing is reverted HOT 13
- Detecting disconnect between ST-Link and target HOT 1
- serial port getting engaged after reading single command in python. HOT 11
- stm32l151zDT6 not supported. Check protection error HOT 5
- Reset does not work with ST-LINK/V3
- STM32G0x devices are missed HOT 1
- Issue running flash HOT 1
- Timeout error
- flash erase command can't suport STM32H7 HOT 1
- Support for STM32G0B1RET6
- *** Supply voltage is 0.01V, but minimum for FLASH program or erase is 2.0V *** HOT 2
- Have you supported to configure option bytes? HOT 2
- Wont run HOT 4
- *** USB Error: [Errno 32] Pipe error *** HOT 3
- flash:erase:verify:address:bin will raise *** Parameter error: 16384 *** when writing bin file to address which already contain data HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pystlink.