Unplugged target or STLink already in use or STLink USB driver not installed
Hi everyone
This is my first post here, and i’m sorry for my english ;)
I bought Board STM32F103C8T6 and I can program it via RS-232 with Arduino IDE (but I don’t want to use it in this way).
So I bought ST-LINK (this one: www.waveshare.com/wiki/ST-LINK).
1) Is it better to buy ST-LINK /V2 instead of ST-LINK?
I use “ST-LinkUpgrade” to upgrade the firmware. My firmware is “V1.J13.S4” and program say it is the latest version for me. I installed drivers from https://www.st.com/content/st_com/en/products/development-tools/hardware-development-tools/development-tool-hardware-for-mcus/debug-hardware-for-mcus/debug-hardware-for-stm32-mcus/st-link.html
I connected ST-Link to board via the SWD, in the way I found on the box - I connected the optional pins too. I connected the power supply directly to board via second USB cable, because if I didn’t then nothing happend.
I can use “STM32 ST-Link Utility” to connect with target (then the LED on ST-Link is RED) or erase the chip (then the LED keeps blinking RED).
In device manager I can see my ST-Link:
1) in USB Controller as Storage Device
2) in Disk Drive as STM32 drive
3) in Portable Devices as F:\ drive - I can see it also in “my computer” as 30MB SD Card.
I cannot see something like “ST-Link” in my device manager. I cannot see anythink else. I don’t have any other drivers, wich I didn’t try to install...
From openstm32.org I installed “system workbench for stm32”. I created my first project (“HelloWorld”) as: new executable empty C project (location is “C:\ARM\projects") and choosen “Toolchains: Ac6 STM32 MCU GCC”. Next is choosen Debug and Release configurations, then the STM32F1 series, and created new custom board for mcu STM32F103C8Tx and interface SWD. Then I chosen Standard Peripheral Library - StdPeriph. After that “built all” -> no errors. So I clicked “Run Configurations”, then double click on Ac6 STM32 Debugging, and then I have my problem, that I cannot solved:
OpenOCD child process termination
Reasen:
Unplugged target or STLink already in use or STLink USB driver not installed.
Details:
‘’Unplugged target or STLink already in use or STLink USB driver not installed
Open On-Chip Debugger 0.10.0-dev-00007-g58350bc-dirty (2018-01-12-12:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter_nsrst_delay: 100
adapter speed: 950 kHz
Info : clock speed 950 kHz
Error: open failed (no matching adapter found)
in procedure ‘program’
in procedure ‘init’ called at file “embedded:startup.tcl”, line 485
in procedure ‘ocd_bouncer’
** OpenOCD init failed **
shutdown command invoked’’
2) What I should do to solve it?
I have Windows 10 Home, all USB ports are 3.0.
I tried to restart computer or change to JTAG. But the error is the same.