I couldn't enter to debug mode

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.

Moderator: Mats P

0x1B
Posts: 27
Joined: Wed Jan 11, 2017 10:14 am

I couldn't enter to debug mode

Postby 0x1B » Wed Jan 11, 2017 10:30 am

Hi ;)

I created embaded C++ project on Atolic TrueSTUDIO Version: 7.0.1 for STM32L151RD mikrokontroler

When I try debuging problem occured:

Failed to execute MI command:
target extended-remote localhost:61234

Haw can I solve this problem ?
You do not have the required permissions to view the files attached to this post.

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

Re: I couldn't enter to debug mode

Postby Mattias Norlander » Wed Jan 11, 2017 4:18 pm

Q: Is the ST-LINK_gdbserver.exe running?
Look in task manager.

Debug launch flow is this:

1. GDB-server starts
2. GDB-server connect to target
3. GDB-client starts and connects to GDB-server

The error you get is from when attempting #3.

But it may be because #1 or #2 failed. You can launch the ST-Link GDB-server externally by running this:
C:\Program Files (x86)\Atollic\TrueSTUDIO for ARM 7.0.1\Servers\ST-LINK_gdbserver\ST-LINK_gdbserver.bat
Does the St-Link GDB-server give any error message?
If not try to change your debug configuration from "Autostart local GDB-server" to "connect to remote GDB-server".
Any error messages in TrueSTUDIO console?
Any error messages in St-Link command-line?

0x1B
Posts: 27
Joined: Wed Jan 11, 2017 10:14 am

Re: I couldn't enter to debug mode

Postby 0x1B » Thu Jan 12, 2017 6:53 am

Hi
Mattias Norlander thenk you for your answer,
I begin adventure with STM ;)

In console I had information:

Connecting to the ST-Link Debugger... FAIL
Error in initializing ST-Link device.
Reason: No device found on target.

The problem of debugging has been partially solved. The problem was the STM32, ST-LINK could not connect with him. I replaced STM32 and now I can enter debugging, but I had another problem. When I try debuging I get massage:

No source available for
View Dissambly...

I configured project for Discavery Board (STM32L152RB) and debug works. I created project in Coo Cox for my board and debug works. I couldn't run debuging in TrueSTUDIO, what could be wrong ?

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

Re: I couldn't enter to debug mode

Postby Mattias Norlander » Thu Jan 12, 2017 8:27 am

Hi,

OK the problem:

Code: Select all

No source available for
View Dissambly...


indicates that the debug information in the elf-file cannot be mapped to c-files. Hence the editor cannot open and display the code you are executing.
Then the next question is why - and that is a more difficult question. Do you have all source-files available in the TrueSTUDIO project?
How did you start this project in TrueSTUDIO? Did you use our project wizard "Embedded C Project" or did you do something else?

0x1B
Posts: 27
Joined: Wed Jan 11, 2017 10:14 am

Re: I couldn't enter to debug mode

Postby 0x1B » Thu Jan 12, 2017 10:10 am

Did you use our project wizard "Embedded C Project"

Yes I used Embedded C Project wizard
1. created folder
2. choose this folder as a workspace
2. File -> New -> C Project -> Embaded C Project -> (selsected STMicroelectronics -> MCUs->STM32 Ultralow powe devices HD -> STM32151RD) -> Debug Probe ST-LINK
3. click - Rebuld 'Debug' for project 'myProgram'
Project compiled with one worning: ignoring changed section attributes for .data
4. I go to main.c file and click Debug -> Apply -> OK and got "No source available for (hex number)

Do you have all source-files available in the TrueSTUDIO project?

How can i check that ?

0x1B
Posts: 27
Joined: Wed Jan 11, 2017 10:14 am

Re: I couldn't enter to debug mode

Postby 0x1B » Thu Jan 12, 2017 10:34 am

sometimes ST-LINK_gdbserver.exe program has stopped working when try debuging.

0x1B
Posts: 27
Joined: Wed Jan 11, 2017 10:14 am

Re: I couldn't enter to debug mode

Postby 0x1B » Thu Jan 12, 2017 12:08 pm

Problem with:

Code: Select all

No source available for
View Dissambly...

is solved. Had to change setting in SystemInit.

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

Re: I couldn't enter to debug mode

Postby Mattias Norlander » Mon Jan 16, 2017 10:54 am

0x1B wrote:sometimes ST-LINK_gdbserver.exe program has stopped working when try debuging.


So is this the only remaining problem?
Do you have a fast PC or an older one? If the ST-Link GDB-server takes too long time to start it may not have started and connected properly to the STM32 device before GDB tries to establish a TrueSTUDIO debug session. That will lead to a crash.
You can run the ST-Link GDB-server from command-line in persistent mode and setup TrueSTUDIO debug config not to auto-start the GDB-server but only connect to what is already running.
C:\Program Files (x86)\Atollic\TrueSTUDIO for ARM 7.0.1\Servers\ST-LINK_gdbserver\config.txt
Set this:

Code: Select all

###############################################################
-e                 : Enables persistant mode
###############################################################

Run the "ST-LINK_gdbserver.bat"

Go into TrueSTUDIO debug configuration > Debugger tab > Connect to remote GDB server.

Perhaps that is a better more stable solution for you...


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 1 guest