Skip to main content
Visitor II
December 3, 2022
Solved

STM-Studio Import Variables fails

  • December 3, 2022
  • 14 replies
  • 7771 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

    Visitor II
    December 3, 2022

    Seems like the snapshot acquisition mode in STMStudio does not work anymore.

    _FAR_DATA amd _NEAR_DATA_ are not defined. Defined as blank, just to proceed.

    In .map file there is no g_traceHeader.startMark[0]. There is g_traceHeader but its address is rejected because it is out of range.

    Looks like STMStudio is abandoned, hope not, because it shines compared to STMCubeMonitor, and this says it all.

    Visitor II
    December 18, 2022

    Hey,

    I struggled with CubeMonitor for some while as I'm moving from C to C++ in one project. I was really disappointed when it turned out STMStudio does not support adding class members to the variable list, and it only sees the class objects. Cube Monitor is so useless I even thought of using a custom script to look for a variable address using gdb and automatically switching them in the STMStudio project config files. However it turned out I don't have to - you can simply place a new variable, manually add its name (for example classInstance.filed), and although it wont show up on the import variable list window, when you click update the address will be found just fine (and later will be updated when it changes during sw development).

    0693W00000WLFbRQAX.png 

    This actually solves two problems - inability to work with C++ members and the error storm that happens when you try to add variable using the import variable popup.

    Hope this helps, and someday ST revisits STMstudio project. In my field (motor control) its the best debug tool there is.

    Visitor II
    December 24, 2022

    I will give it a try, thanks.

    I totally agree with you about the importance of a monitor/scope/data injection//data logger/data export tool. Only reason I can think for its absence is the Arduino printf debugging attitude of some people that does not know the development tools available for decades. Marketing convinced them about the beauty of a dumbed dow experience, and these are the results.

    FWIW the best I am using is Micrium UC/Probe, than Freemaster, both offered for free from other suppliers. Without tools like these I'm sorry but I can't think I would start a new project.

    Visitor II
    December 27, 2022

    Hello Piotr,

    Unfortunately your method does not work for me. It seems you are able to get past the executable file selection step. This is not my case, it seems that there is something odd with the symbol table for CMSIS symbols.

    Maybe there is some linker option that takes care of this. And there are tools for .elf inspection.

    But I simply give up in dispair. I will resolve the addresses by hand, like it was 1980.

    Can't understand why they get the symbols from the .elf instead of the .map.

    Graduate II
    December 27, 2022

    Probably because .MAP files are very linker/version dependent, while the .ELF is better established, consistent, and potentially carries other meta-data.

    But yes having something that can parse ASCII tables would be easier to fix or script.

    Visitor II
    December 29, 2022

    Yes, very true. I mentioned it because a competitor has the .map option.

    The problem I have, and other, like the need for a 32 bit Java RE, does not come from .elf but from the lack of any update to STMStudio.

    Visitor II
    December 28, 2022

    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 :)

    Visitor II
    December 29, 2022

    You are right, it works! Thanks a lot. It is better to click with the mouse button instead of the enter key to avoid restarting the import.

    A big step forward, thanks again.

    Alberto

    Visitor II
    June 11, 2023

    Hello,

    After some time I got fed up with STMStudio and decided to prepare my own tool. If any of you would be interested in trying it out and testing it I'd be grateful for any feedback. Currently it's quite limited when it comes to features, but it's a solid tool for basic real-time debugging.

    Visitor II
    June 12, 2023

    Hello Piotr,

    this is great news. I will check it ASAP. ST should support your work.

    Thank you, I will report.

    Visitor II
    June 23, 2023

    Hello Piotr,

    I'm checking your tool but I can't find the .deb or the Windows installer that are mentioned in the readme file.

    Am I missing something or is it just a matter of waiting for them to be ready?

    Thanks again

    Alberto

    Visitor II
    July 3, 2023

    Hello Alberto,

    I'm sorry for a late response - I think I must have missed the email. You should proceed to Releases page of the repo, vertical bar on the right side of the repo website. The latest version is 0.1.2. 

    Visitor II
    July 4, 2023

    Thanks Piotr.

    Testing the Windows release right now.

    I am not able to add variables. Using a global variable and checked for its presence in .map file.

    I press "Update variable address", a black window flashes for a moment but its address remains "NOT FOUND!".

    Same .elf, same variable don't give any trouble in STM-Studio.

    Regards

    Alberto

     

     

    Visitor II
    July 4, 2023

    Thanks for a quick response! Would you be able to provide the *.elf file you've tried? I will look into that. 

    Do you have GDB installed and added to your PATH? You can check it by typing gdb in the windows cmd.