Debug Session Failed in v9.1 & v9.2

Discussions concerning TrueSTUDIO for STM32 9.0.0 and later versions.

Moderators: Markus Girdland, Mattias Norlander

kevinwabbit
Posts: 4
Joined: Fri Dec 07, 2018 1:20 am

Debug Session Failed in v9.1 & v9.2

Postby kevinwabbit » Fri Dec 07, 2018 2:09 am

Hello everyone,
There are three different version of TruesSTUDIO installed in my computer.
    TrueSTUDIO for STM32 9.0.0
    TrueSTUDIO for STM32 9.1.0
    TrueSTUDIO for STM32 9.2.0

When I tried to start debugging session on v9.1 and v9.2, it failed.But everything work fine in v9.0.
The error dialog showed by the v9.2 is (I don't know how to post a screen shot :| ):

Title:Launch terminaed
Content:Failed to fetch device information

Title:Embedded C/C++ Application
Content:Failure at line:6 in 'Target Software Startup Scripts'.Please edit the debug configuration settings.
Error finishing flash operation

The debug log showed below:
STMicroelectronics ST-LINK GDB server. Version 5.1.0
Copyright (c) 2018, STMicroelectronics. All rights reserved.

Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled

Waiting for debugger connection...
Debugger connected
Encountered Error when opening ..\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Encountered a Socket Error, Exiting..
Debugger connection lost.
Shutting down...


I didn't modify the target software startup scripts, it just keep default.
# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers
# 2=32 bit, 1=16 bit and 0=8 bit parallelism mode
monitor flash set_parallelism_mode 2

# Load the program executable
load

# Enable Debug connection in low power modes (DBGMCU->CR)
set *0xE0042004 = (*0xE0042004) | 0x7
# Set a breakpoint at main().
tbreak main

# Run to the breakpoint.
continue


I also installed the STM32CubeProgrammer v1.3.0 GUI interface.It is well connected to ST-Link V2 which firmware version is V2J32S7. The elf file download process is successfully with this standalone CubeProg.

I tried to totally close OS firewall, but nothing change.

I'm going to use v9.0 until this problem fixed.

dbwright
Posts: 1
Joined: Fri Dec 28, 2018 6:51 pm

Re: Debug Session Failed in v9.1 & v9.2

Postby dbwright » Fri Dec 28, 2018 7:00 pm

Hi Everyone,
I am having the exact same issue. I tried uninstalling and reinstalling v9.2, and nothing changed.
The only change from yesterday when it was working is that I let Windows do an update, that added features.
What is happening?
-B

DD4DA
Posts: 46
Joined: Thu Jan 11, 2018 10:06 pm

Re: Debug Session Failed in v9.1 & v9.2

Postby DD4DA » Sun Jan 06, 2019 9:52 pm

I did the same experiences with 9.1 and 9.2. The issue must be in the support Code who atollic build-into the eclipse to do the communication between the cdt and atollic processes. The Code that is produced by the toolchain seems to be ok. Seggers Ozone works Pretty in combination of j-link.
In addition, the build-analyzer did also not work since 9.1.

I am appreciate if the newer atollic TS would work as expect.

Markus Girdland
Posts: 146
Joined: Thu May 11, 2017 11:27 am

Re: Debug Session Failed in v9.1 & v9.2

Postby Markus Girdland » Mon Jan 07, 2019 10:21 am

Could you enable the gdbserver log in the debugger tab of the debug configuration?
Might lead to a clue what's happening.

kevinwabbit
Posts: 4
Joined: Fri Dec 07, 2018 1:20 am

Re: Debug Session Failed in v9.1 & v9.2

Postby kevinwabbit » Mon Jan 07, 2019 10:54 am

Markus Girdland wrote:Could you enable the gdbserver log in the debugger tab of the debug configuration?
Might lead to a clue what's happening.

Hi Markus,
I attach the log file you mentioned.
It seems like some errors happened when the debugger tried to open STMProgrammerCLI.
Since I am not an expert in debug technology, I don't know how to fix it.
You do not have the required permissions to view the files attached to this post.

Markus Girdland
Posts: 146
Joined: Thu May 11, 2017 11:27 am

Re: Debug Session Failed in v9.1 & v9.2

Postby Markus Girdland » Mon Jan 07, 2019 4:05 pm

You're right, it looks like an access problem.
However, the return code of -1073741819 seems very odd.

If you make sure the output format of your project is .srec and generate a .srec file in your project, can you then manually access the CLI?
You would still use the command:

Code: Select all

D:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.2.0\Servers\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" --connect port=SWD mode=UR reset=hwRst --download C:\Users\kevin\AppData\Local\Temp\ST-LINK_GDB_server_a07804.srec --verify --log C:\Users\kevin\AppData\Local\Temp\STM32CubeProgrammer_a07804.log


Although you modify the .srec file to where it's actually located now that it's not Temp and you change the log location to a more suitable location.

fkramos
Posts: 2
Joined: Thu Jan 10, 2019 6:03 pm

Re: Debug Session Failed in v9.1 & v9.2

Postby fkramos » Thu Jan 10, 2019 6:07 pm

DD4DA wrote:In addition, the build-analyzer did also not work since 9.1.


I solved the analyzer bug doing a perspective reset:
Window->Perspective->Reset Perspective

(make to sure to backup if you don't want to lose your settings).

Maybe it could solve your problem too.

kevinwabbit
Posts: 4
Joined: Fri Dec 07, 2018 1:20 am

Re: Debug Session Failed in v9.1 & v9.2

Postby kevinwabbit » Tue Jan 15, 2019 7:00 am

Markus Girdland wrote:You're right, it looks like an access problem.
However, the return code of -1073741819 seems very odd.

If you make sure the output format of your project is .srec and generate a .srec file in your project, can you then manually access the CLI?
You would still use the command:

Code: Select all

D:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.2.0\Servers\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" --connect port=SWD mode=UR reset=hwRst --download C:\Users\kevin\AppData\Local\Temp\ST-LINK_GDB_server_a07804.srec --verify --log C:\Users\kevin\AppData\Local\Temp\STM32CubeProgrammer_a07804.log


Although you modify the .srec file to where it's actually located now that it's not Temp and you change the log location to a more suitable location.


I finally found out what cause this problem.
Because my OS account name contains non-English characters. So that command you posted won't be execute correctly.
I just modified the log file for privacy.
Now I create a new pure English named OS account, and open TS from that. The debug session run well.
Hope will help others. And hope the next version of STM32Prog will support non-English path parameters.
Last edited by kevinwabbit on Wed Jan 16, 2019 12:59 am, edited 1 time in total.

Markus Girdland
Posts: 146
Joined: Thu May 11, 2017 11:27 am

Re: Debug Session Failed in v9.1 & v9.2

Postby Markus Girdland » Tue Jan 15, 2019 1:07 pm

So the C:\Users\kevin\ is something else instead of 'kevin'?
After your report that it's the non-English characters that's the problem I've done some testing and it seems to be a problem in multiple STM32 tools so I'm going to write a ticket about it.

Could you tell me what encoding you used in your username? You don't need to tell me the username if you prefer to keep it for privacy reasons but if you could give me the word for "Test" or something to copy so I can do some testing I would be grateful!

kevinwabbit
Posts: 4
Joined: Fri Dec 07, 2018 1:20 am

Re: Debug Session Failed in v9.1 & v9.2

Postby kevinwabbit » Wed Jan 16, 2019 12:58 am

Markus Girdland wrote:So the C:\Users\kevin\ is something else instead of 'kevin'?
After your report that it's the non-English characters that's the problem I've done some testing and it seems to be a problem in multiple STM32 tools so I'm going to write a ticket about it.

Could you tell me what encoding you used in your username? You don't need to tell me the username if you prefer to keep it for privacy reasons but if you could give me the word for "Test" or something to copy so I can do some testing I would be grateful!

Hi Markus,
I use Windows 10 Home Edition, time zone is UTC+8, country is China, language is Chinese Simplified.
This time I create a new "Chinese Name" account, and the debug session failed again.
The original log file is attached. I don't know what encoding is use for these path parameters, maybe is depended on OS.
You do not have the required permissions to view the files attached to this post.


Return to “TrueSTUDIO for STM32 discussions”

Who is online

Users browsing this forum: No registered users and 1 guest