Skip to main content
AlbertoGarlassi
Associate II
December 3, 2022
Solved

STM-Studio Import Variables fails

  • December 3, 2022
  • 14 replies
  • 7774 views

Hello, after selecting the .elf file I get hundred of messages of this type:

GDB Cmd [print /x & arm_cfft_sR_f32_len128.pTwiddle] failed

Error: Address of symbol "arm_cfft_sR_f32_len128" is unknown

and similar, all related to CMSIS.

After I ack all of these errors the import restarts with the same errors, only way out is by killing the program via process manager.

All OK when variable addresses taken from .map are inserted, big pain but OK.

What can be done?

I'm aware of STMCubeMonitor, tried it but it looks like it's a joke, or at least not what I need. I just need a scope and a table to read and write variables. AFAIK CubeMonitor does not even have vertical scale adjust, just to mention the first showstopper.

I'm shure that 99% of people share my needs.

BTW STMCubeMonitor could conveniently be replaced with a binding to Python or whatever, then everybody chooses his own gui, framework etc.

This topic has been closed for replies.
Best answer by Wasilewski.Piotr

Hey,

So in the first step I import the elf file like it should be done - using the popup (and i get a lot od errors which I close manually - you have to be careful because holding enter key may be too fast and you'll end up on another batch of errors since enter also confirms the elf file you've selected). When the file is already saved in the project you can just add a new variable like I've mentioned previously.

If you'd like you can send me the elf file and I can try to import a variable on my setup :)

14 replies

AlbertoGarlassi
Associate II
July 5, 2023

This is a link to the elf file: https://we.tl/t-Uua8jDQ3W2

Try to visualize the uint32_t variable  named TestGlobalVar

gdb is installed and PATH is ok.

Regards

Alberto

Wasilewski.Piotr
Associate III
July 5, 2023

Thank you, Alberto! 

I think this variable might be unused and maybe you have some optimization turned on? I can see STMStudio sees it, but it's address is invalid (0x00). 

WasilewskiPiotr_0-1688584981858.png

Other variables seem to work fine in STMViewer:

WasilewskiPiotr_1-1688584997404.png

Though it's an interesting case that STMStudio sees it. I think it depends on the GDB version (STMStudio provides it's own GDB). I will investigate that. In the meantime, please let me know if other variables are working fine. 

 

AlbertoGarlassi
Associate II
July 7, 2023

Piotr, unfortunately I can't make it find the address of any variable, like SendGreetings. 

I will do more tests next Monday, for now what I tried is:

Substitute / with \ in the .elf path

Put the .elf in the StmViewer.exe folder and load it without \ or /

Put the .elf in C:\ to have the path as short as possible

insert the variable's name with or without the trailing space that is inserted when "add var" is pressed

Thanks again and have a good weekend

Alberto 

 

Wasilewski.Piotr
Associate III
July 10, 2023

Would you be willing to switch to email so that we don't spam too much here? We will post the final solution when the problem is solved. You can contact me using: piwasilewski@interia.pl. Also could you attach the logfile? It is located under C:\Users\<username>\AppData\Roaming\STMViewer\logs. 

AlbertoGarlassi
Associate II
July 11, 2023

In the future I will certainly do so.

But for now it's not needed because I was able to make it work.

It was just a matter of using another version of GDB. I was using 11.2, now it is 13.2,  from https://github.com/brechtsanders/winlibs_mingw/releases/download/13.1.0-16.0.5-11.0.0-ucrt-r5/winlibs-i686-posix-dwarf-gcc-13.1.0-llvm-16.0.5-mingw-w64ucrt-11.0.0-r5.zip

I will report later, thanks for now.

Alberto

Garnett.Robert
Senior III
August 7, 2023

You are correct.

 

The Cube Monitor is a hard way to do a simple task and as you pointed out the charts do no have scaling so if you have variables of greatly different magnitudes then it is useless.

I can't believe anyone in ST would use the monitor for debugging realtime systems.

STM Studio isn't perfect, the horizontal scaling is very clunky, but it takes about five minutes to set up and it is ultra reliable when it runs.