cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Initializing ST-Link device

rajan2
Associate II
Posted on September 27, 2011 at 05:06

Hi, 

Just started playing around with my STM32 discovery board, and had a problem right away. I'm using atollic trueStudio IDE and trying to load a demo project(the one in firmware package), to my microcontroller. The thing is everytime I hit debug button It shows this in console:

Starting server with the following options: 

        Persistant Mode            : Disabled 

        LogFile Name               : debug_log.txt

        Logging Level              : 1

        Listen Port Number         : 61234

        Status Refresh Delay       : 15s

        Verbose Mode               : Disabled 

        SWD Debug                  : Enabled 

Error in Initializing ST-Link device

I spent entire day searching web, if I could find a solution but no success yet. I found this page(

http://www.atollic.com/index.php/kb/3-debugging/28-kb_st_link_connection_error

) on atollic website, have followed the steps but still no luck. So these are the things which I have already tried:

- checked USB cable

- tried running ST-LINK GDB server, same error

- checked the driver installation, and updated to latest version

- no disk letter issue, st link is using G: and it is vacant

I have followed the user manual steps exactly still unsure what's wrong with my board. Any help appreciated.

#debugging #st-link-gdbserver #driver
16 REPLIES 16
frankmeyer9
Associate II
Posted on June 08, 2012 at 17:47

Well, I have some troubles to understand french error message, but it still seems that Atollics GDB server can't access the stlink.

It is certainly not impossible that the board or the stlink part is damaged.

Have you tried the STLink Utility ?

Does it show the same issue if you try the board on your co-workers PC (or any other PC, for that matter) ?

If you have some testhardware attached, better remove it.

I, for instance, had difficulties when trying to debug a stm32f4discovery with a LCD panel attached. It worked reliably only after supplying the board externally, and not via USB.

Posted on October 21, 2015 at 10:01

hye clive... can i know what is BOOT0 high? how 2 do it?

Posted on October 21, 2015 at 15:13

It's a pin on the device, pull it high with a pull-up resistor to the supply.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ENIT_18
Associate II

Hello, I had the same problem and I find a solution.

What I did is: I opened the Atollic directory then I searched for "stlinkv2usbdriver" directory. In it I find an application "dpinst_amd64.exe" (for my case). I Executed it. I opened my project with TrueSTUDIO. I builded it then I pressed "debug as ...". At this point, the IDE proposed to me to upgrade the STLink. So, I upgrade it. Then, I was able to run my program.

I hope it will help someone.

Source of the solution: https://youtu.be/vVlYypB7rew?t=327

mmrad
Associate

I had the same problem with debugging.

Finally I figured out that it can be solved simply by changing the port number in debug setting.

I choose another random port number and it perfectly works .

siddiq.habib
Associate III

Hi All,

I had the same problem and the solution in my case was as simple as using the proper USB Cable which came with the ST-Utility. Earlier i was using the cable that was used to charge my phone (a spare one).

Legacy member
Not applicable

I just found this thread - I had the same problem.

What worked for me was to allow st-link gdb server and stm32cube IDE in Windows Firewall. If the network access is denied, the USB device can't be detected in Windows.

0690X00000DYrlKQAT.png