cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link cli on windows not detecting ST-Link device using SN

wafihsn
Associate

Hello, i have multiple st-link v2 devices that i would like to use on the same machine

i have tried it on windows and linux machone

i have these command

for windows: (example)

ST-LINK_CLI.exe -c sn=57004800180000535448534E -q -ME -p C:\shared\TFL_CONNECT_A4_S.10.118.0.16.hex -Rst

for linux: (Example)

st-flash --format ihex --serial 57004800180000535448534E  write C/shared/TFL_CONNECT_A4_S.10.118.0.16.hex -Rst

when i run it on windows its giving me this ERROR:

No ST-LINK [ID=57004800180000535448534E] Found!

but when i us ID=0 (example) instead of SN=<SNnumber> it works fine

also...

when i run it on Linux its working perfectly

its the same hardware the same connections same in every way, the only difference is only the OS

do anyone have an idea on what might be the problem ?

2 REPLIES 2
TDK
Guru

> its the same hardware the same connections same in every way, the only difference is only the OS

But is it? ST-LINK_CLI and st-flash are totally different applications.

Probably due to ST-Link detecting or somehow not playing nice with counterfeit programmers.

Should use STM32CubeProgrammer, it has a CLI application and is supported. ST-Link utility has been deprecated for many years. Whatever it does, it's unlikely to change. Works on windows and linux.

If you feel a post has answered your question, please click "Accept as Solution".
Mike_ST
ST Employee

Hello,

ST-Link utility is deprecated,

Could you try with the STM32CubeProgrammer ?:

https://www.st.com/en/development-tools/stm32cubeprog.html

Example:

STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe -c port=SWD sn=XXXXXX mode=UR -d your_soft.hex -hardRst