After some digging I found texane stlink utility inside libraries, but is only 4 years outdated(v0.5.6), after download the last version(1.3.0) compiled for windows(I try but don’t success) and a small change on stlink_upload.bat it worked.
EDIT: The last release is 1.4.0
Is possible to update and set as default st-link program on all systems?
https://github.com/stm32duino/Arduino_T … ab4af1f14e
It could help as it’s based on the same script. Main issue was for the library path.
[fpiSTM – Mon Aug 28, 2017 7:17 pm] –
I’ve made the job here for the 1.3.0
https://github.com/stm32duino/Arduino_T … ab4af1f14e
It could help as it’s based on the same script. Main issue was for the library path.
My knowledge in C is very small, I have downloaded Cygwin64 to try compile it for windows but only got errors. The version 1.3.0 have a small bug, v1.3.1 fixed it
I mainly shared for script update as there are the same for linux/MacOs

[fpiSTM – Mon Aug 28, 2017 8:46 pm] –
Fix in 1.3.1 is mainly for build. Not required as we provide the binary. I do not compile it for windows as we provide st-link utility for windows.
I mainly shared for script update as there are the same for linux/MacOs![]()
st-link utility for windows don’t work with st-link clones but texane’s do
I will give a try

I’ve built the texane stlink 1.4.0 for Windows (64bits), it is available here if you want make a try
https://github.com/fpistm/stm32_tools/r … -win64.zip
[fpiSTM – Tue Aug 29, 2017 9:41 am] –
Hi, @vitor_boss
I’ve built the texane stlink 1.4.0 for Windows (64bits), it is available here if you want make a try
https://github.com/fpistm/stm32_tools/r … -win64.zip
It’s alive, worked like a boss. Thank you.
You will include and let it default for windows?
rem: ------------- use STLINK CLI
rem:stlink\ST-LINK_CLI.exe -c SWD -P %str% 0x8000000 -Rst -Run
rem: Using the open source texane-stlink instead of the proprietary STM stlink exe
texane-stlink\st-flash.exe write %str% 0x8000000
This should be great to align to the same version but this need to build for all platform. Linux is not an problem but currently I could not build it for MacOs. Moreover, I think the windows version need to be build for win32 instead of win64.
Just FYI, I do not have special issue to the build, only issue with ST proxy. I’ve downloaded manually the libusb and the full install of mingw64.
Maybe you missed to update the path for cmake and mingwin the .bat script file?
@echo off
set PATH=C:\Program Files (x86)\CMake\bin;C:\Program Files\CMake\bin;C:\Program Files\mingw-w64\x86_64-7.1.0-win32-sjlj-rt_v5-rev2\mingw64\bin;%PATH%
cmake -G "MinGW Makefiles" ..
mingw32-make
mingw32-make install DESTDIR=_install
mingw32-make package

Seems related to libusb.
https://github.com/texane/stlink/issues/523#issuecomment-292152457
Thank you for your time.