Update texane stlink

vitor_boss
Mon Aug 28, 2017 6:46 pm
I bought a ST-Link clone from Aliexpress and it works with STM32 ST-LINK Utility but couldn’t upload on arduino.

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?


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.

vitor_boss
Mon Aug 28, 2017 8:32 pm
[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


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 ;)

vitor_boss
Mon Aug 28, 2017 8:51 pm
[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


fpiSTM
Mon Aug 28, 2017 9:09 pm
I know. I have already asked myself the question to add it to Arduino_Tools repo and let user choose his preferred stlink tools. At least to have the same tools for all host OS.
I will give a try ;)

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

vitor_boss
Tue Aug 29, 2017 8:50 pm
[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


fpiSTM
Wed Aug 30, 2017 6:57 am
In fact, this need more stuff.
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?


vitor_boss
Wed Aug 30, 2017 11:19 am
No, I did everything needed but always return error. mingw64-build.bat:
@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

fpiSTM
Wed Aug 30, 2017 12:40 pm
Hum, interesting. You build on a 32 bits windows?

vitor_boss
Wed Aug 30, 2017 1:06 pm
No, my Windows is 10 Pro x64
Image

fpiSTM
Wed Aug 30, 2017 1:27 pm
Ok. I’ve built it on a Win7 64 bits. I will give a try at home with my personal PC running with Win 10 x64

fpiSTM
Wed Aug 30, 2017 9:14 pm
Just built in on win10 x64. no issue.
Seems related to libusb.
https://github.com/texane/stlink/issues/523#issuecomment-292152457

vitor_boss
Wed Aug 30, 2017 10:38 pm
I put the folder on D: and had installed all related tools.

Thank you for your time.


Leave a Reply

Your email address will not be published. Required fields are marked *