Page 1 of 1

STLink not found

Posted: Sun May 17, 2020 11:05 am
by tsgwiro1
I would like to use an STLink V2 to upload and debug code.
I have downloaded the drivers from the website and installed them sucessfully the STLink shows correct in device manager on my 64Bit Windows 10.
In the arduino IDE (1.8.10) I selected STLink as upload method. Unfortunately the STLink is not found. The Boot Jumpers on the Board are both on 0 (to the left). Upload via serial works with the jumper boot 0 = 1

Here the console output from the arduino IDE

Code: Select all

Compiling 'Test_STM32' for 'Generic STM32F103C series'
Program size: 14 212 bytes (used 22% of a 65 536 byte maximum) (1.81 secs)
Minimum Memory Usage: 3128 bytes (15% of a 20480 byte maximum)
Uploading 'Test_STM32' to 'Generic STM32F103C series' using 'COM17'
Uploader started for board Generic STM32F103C series
Upload method will be: bootloader
Uploading via Bootloader 
Resetting to bootloader via Serial
Serial reset
Reset via USB Serial completed
C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win\stlink_upload.bat "C:\Users\roger\AppData\Local\Temp\VMBuilds\TEST_S~1\STM32D~1\Release/Test_STM32.ino.bin"
C:\Program Files (x86)\Arduino-1.8.10\java\bin>rem @echo off 
C:\Program Files (x86)\Arduino-1.8.10\java\bin>rem: Note C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win\ get path of this batch file 
C:\Program Files (x86)\Arduino-1.8.10\java\bin>rem: Need to change drive if My Documents is on a drive other than C: 
C:\Program Files (x86)\Arduino-1.8.10\java\bin>set driverLetter=C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win\ 
C:\Program Files (x86)\Arduino-1.8.10\java\bin>set driverLetter=C: 
C:\Program Files (x86)\Arduino-1.8.10\java\bin>C:
C:\Program Files (x86)\Arduino-1.8.10\java\bin>cd C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win\ 
C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win>rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name 
C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win>set str="C:\Users\roger\AppData\Local\Temp\VMBuilds\TEST_S~1\STM32D~1\Release/Test_STM32.ino.bin" 
C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win>set str="C:\Users\roger\AppData\Local\Temp\VMBuilds\TEST_S~1\STM32D~1\Release\Test_STM32.ino.bin" 
C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win>rem: ------------- use STLINK CLI 
C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win>stlink\ST-LINK_CLI.exe -c SWD -P "C:\Users\roger\AppData\Local\Temp\VMBuilds\TEST_S~1\STM32D~1\Release\Test_STM32.ino.bin" 0x8000000 -Rst -Run -NoPrompt 
	The upload process has finished.
STM32 ST-LINK CLI v3.3.0.0
STM32 ST-LINK Command Line Interface
No ST-LINK detected!
C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win>rem: Using the open source texane-stlink instead of the proprietary STM stlink exe 
C:\Users\roger\AppData\Local\arduino15\packages\stm32duino\tools\stm32tools\2020.5.16\win>rem:texane-stlink\st-flash.exe write "C:\Users\roger\AppData\Local\Temp\VMBuilds\TEST_S~1\STM32D~1\Release\Test_STM32.ino.bin" 0x8000000 

Any help is very apprechiated

Re: STLink not found

Posted: Mon May 18, 2020 9:53 am
by fpiSTM
Did you try to update the STLink firmware ?
Or maybe the firmware is too recent and then the STM32 ST-LINK CLI v3.3.0.0 is not able to manage it.
You could try to use the sTM32CubeProgrammer to test if you are able to connect (it also help to update the STLink fw).

Is it an official STLink or a clone ?

Re: STLink not found

Posted: Sun May 31, 2020 6:24 pm
by RooiWillie
I have the same problem when using Arduino 1.8.12 on Windows 10 x64 Pro with the latest windows updates installed. I am using a clone that is recognized by STM32CubeIDE with Firmware V2J36S7. I also tried firmware V2J34S7 and V2J37S7 - no joy.

When looking at the STM32 ST-LINK Utility, the following version information is displayed under Help -> About:
STM32 ST-LINK Utility v4.5.0.0
STLinkUSBDriver.dll v5.1.2.0
ST-LINK_CLI.exe v3.5.0.0

Re: STLink not found

Posted: Wed Jul 01, 2020 3:46 pm
by kadricanul
well , in my case i was not be able to upload any code to stm32 on arduino ide so i have downloaded the arduino ide v 1.8.5 and st-link utility 3.3.0 (i was using 3.5.0) and then it just started to work. hope this helps

Re: STLink not found

Posted: Wed Jul 01, 2020 4:19 pm
by fpiSTM
Well pay attention that the ST Link utility used by arduino IDE is the one provided with Roger's core not the one you installed. ... win/stlink

Re: STLink not found

Posted: Wed Jul 01, 2020 5:35 pm
by ag123
agreed with fpiSTM,
i'm not too sure about windows but you may need to place the copy of st-link in the tools folder of the core, replacing that installed

alternatively which is what i do is to search for the Arduino temporary build paths ... -binaries/
you would find the binaries there and you can use a tool of your preference to flash the bin file.
the build path can be set in preferences to a fixed location as well see the link above