ST-Link debug not working

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

Fred
Posts: 0
Joined: Tue Jul 05, 2016 5:05 am

More info on my settings: I

Postby Fred » Wed Jul 06, 2016 1:30 pm

More info on my settings:

I run W7 64bits.
ST-link debug works with Coocox.
I have tried with an other PC, also running W7 -> same issue...

I am a bit worried because I have designed a board for which the softis supposed to be based/developped under Atollic...

Thanks for your help.
Fred

Mattias Norlander
Posts: 273
Joined: Fri Apr 29, 2016 10:01 am

Run the ST-Link GDB-server with

Postby Mattias Norlander » Thu Jul 07, 2016 3:55 am

Run the ST-Link GDB-server with verbose flag (-v)
C:\Program Files (x86)\Atollic\TrueSTUDIO for ARM 5.5.2\Servers\ST-LINK_gdbserver\config.txt
Then run this bat-file:
C:\Program Files (x86)\Atollic\TrueSTUDIO for ARM 5.5.2\Servers\ST-LINK_gdbserver\ST-LINK_gdbserver.bat

Compare the output you get when connecting your custom board to that you get with the F729, perhaps that could give you some clues.

For reference I get this with ans STM32FF29I-Discovery:


=============================================================
Atollic TrueSTUDIO gdbserver for ST-Link. Version 2.4.2 Pro
Copyright 2010-2016, Atollic AB.


Starting server with the following options:
Persistant Mode : Enabled
LogFile Name : debug.log
Logging Level : 31
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Enabled
SWD Debug : Enabled

Connecting to the ST-Link Debugger...Enter STM32_AppReset() function
NVIC_DFSR_REG = 0x00000009
NVIC_CFGFSR_REG = 0x00000000
XPSR = 0x01000000
ST_LINK Major version =2 Jtag version =25
ST_LINK VID=1155 PID=14152
ST_LINK device status: HALT_MODE
ST_LINK detects target voltage =2.88 Volt
Hardware watchpoint supported by the target
FuncEntry
STM32 device: id =10036419
STM32 device: Flash size =2048
FuncExit
FuncEntry
FuncExit
OK
Start Logging
Waiting for debugger connection...Waiting for TrueSTUDIO client to connect on port 61234 ...
=============================================================

This means initialization went fine...

Fred
Posts: 0
Joined: Tue Jul 05, 2016 5:05 am

Hi Mattias, thank you for the

Postby Fred » Thu Jul 07, 2016 2:54 pm

Hi Mattias,

thank you for the reply.

The initialization goes fine, the problem comes after:
"TrueSTUDIO failed to verify connection to GDB server, please check your firewall settings."

I also tried to launch from the .bat and Connect to remote GDB server:
"Failed to connect to ST-LINK GDB server. Please make sure the ST-LINK GDB server is started properly prior launching the debug session."

Tried with antivirus and firewall OFF, cable disconnected, different port...

No luck so far.

Fred

Mattias Norlander
Posts: 273
Joined: Fri Apr 29, 2016 10:01 am

This may sound like a

Postby Mattias Norlander » Fri Jul 08, 2016 5:58 am

This may sound like a weird suggestion but try disconnecting your ethernet cable from your computer running TS. We have had reports that the behaviour you describe has been resolved by pulling the cable.

But if you can debug another board successfully - it sounds even less likely. Look here:
http://atollic.wpengine.com/forums/topic/st-link-debug-not-working/

Fred
Posts: 0
Joined: Tue Jul 05, 2016 5:05 am

Hi, I have tried disconnecting the

Postby Fred » Fri Jul 08, 2016 8:46 am

Hi,

I have tried disconnecting the cable but it doesn't work.
I seems server and client can't talk to each other.
Both are launched (I can see it the processus list), both seem correct when launched from command line.

Fred

Fred
Posts: 0
Joined: Tue Jul 05, 2016 5:05 am

Wow! found it! (no, my network

Postby Fred » Fri Jul 08, 2016 11:12 am

Wow!

found it! (no, my network admin did...).

Go to tab: Window >> Preferences >> General >> Network Connections : select Active Provider: "Direct" instead of "Native".

Fred


Mattias Norlander
Posts: 273
Joined: Fri Apr 29, 2016 10:01 am

Congratulations! So this fixes your

Postby Mattias Norlander » Mon Jul 11, 2016 6:02 am

Congratulations! So this fixes your problem with GDB-client not able to connect to GDB-server?

Fred
Posts: 0
Joined: Tue Jul 05, 2016 5:05 am

Yes it does!

Postby Fred » Mon Jul 11, 2016 6:48 am

Yes it does!

Feuerwerfer
Posts: 0
Joined: Sun Aug 07, 2016 11:01 am

Thanks so much for finding

Postby Feuerwerfer » Sun Aug 07, 2016 12:06 pm

Thanks so much for finding this out!
I had the same problem and it solved mine too.

Mattias Norlander
Posts: 273
Joined: Fri Apr 29, 2016 10:01 am

Aynone else getting the "error

Postby Mattias Norlander » Wed Sep 28, 2016 11:55 am

Aynone else getting the "error 37" when trying to launch debug session with ST-Link?
If so, please try launching debug sessions with ST-Link GDB-server in persistent mode.

1. Go to your TrueSTUDIO installation directory, and locate the folder where ST-Link GDB-server is located, i.e:
C:\Program Files (x86)\Atollic\TrueSTUDIO for ARM 6.0.0\Servers\ST-LINK_gdbserver\
2. Verify that the config.txt file in this folder uses "-e" option for persistent mode.
3. Make sure your target board is connect to the computer
4. Launch the bat-file: ST-LINK_gdbserver.bat
5. In TrueSTUDIO open the debug configuration: Run --> Debug configurations
6. Open the Debugger tab and switch GDB connection settings to: "Connect to remote GDB server". Save and launch the debug sessions.

Are you still able to trigger the "error 37" error message? If so, does it happen every time? First time? Not first time but always after first time?

We are working on a fix, but since we cannot re-produce the problem we need feedback.


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests