Skip to main content
DVolp.5
Visitor II
July 25, 2019
Question

[BUG] STM32CubeIDE Live Expression sometimes fail to evaluate expression.

  • July 25, 2019
  • 22 replies
  • 30030 views

Hi,

I have noticed a little problem in the "Live Expressions" function.

The first time I open STM32CubeIDE and debug my firmware, I can see the value of all expressions previously written by me.

When I stop the debug and debug again, some expressions does'nt show the value. Instead this appears the message " Failed to evaluate expression".

The curious is that if I "rename" the expression the correct value appears again. For example, adding a space (or removing a space) at end of a expression with the message " Failed to evaluate expression" solve the problem.

This are happenning with anyone more?

This is a real bug?! How this problem can be solved?

Best regards, 

DIego Volpini

22 replies

sam
Explorer
July 28, 2024

2024 now. I can't believe it the problem is still NOT solved! I'm having the same problem!!!!

Senior
September 8, 2024

    Hallo everyone suffering from this 4 years old problem,

I experience identical problems with the ST-LINK debugger in CUBEIDE version 1.16.0 on a Win11 x64 PC, but with specific variables only! The issue started appearing after I got some experience with the STM32H723 MCU and wanted to view the values of DMA1_Streamx (where x = 0...7) components. Only with this kind of variables I have experiences, just like descibed by many users before. The appliance of some suggested tricks (increase heap and stack size, change gcc settings) did not work for me.

When I looked up the source of this group variables I found it to be a define:

#define DMA1_Stream0 ((DMA_Stream_TypeDef *) DMA1_Stream0_BASE)

that in my opinion evaluates to the pointer to the structure of  'DMA_Stream_TypeDef'. Maybe it is for people with more background knowledge understandable why the debugger is not capable to evaluate a variable with this structure? On the other hand, in some occasions it simply works for me, so what is going on? A race condition in parsing the variable names to adresses where the values are stored?

When trying to understand why my project code isn't doing what I want (a real challenge on its own) it is very annoying when the debugger shows required information only ~10% of the times, because this issue is still not solved!

Quite some time ago a ST employee showed some interest, but unfortunately this did not change the situation in our favor.  How long do we have to suffer?

A bit disappointed user,

        Fred Schimmel

Associate II
December 2, 2025

I have taken as same problem and I solved it.
First Step:
Delete you that your project's debug file with hand.
Step Two:
project>clean>all clean
Step three;
Make your mcu full chip erase.
Step four:
Delete your debug adjust in the project and create a new debug profile

actually I don't know which step helped me. I respectively did every steps