cancel
Showing results for 
Search instead for 
Did you mean: 

Does STM32CubeIDE not support live variable watching?

DHama.1
Associate

We are trying to achieve the same kind of variable watching Keil has but with the STM32CubeIDE. The variables do not appear in the Variables tab under the Debug view so we added dummy variables to the expression tab. The initial value of the variable shows fine and then when we resume the program after the HAL_Init breakpoint the 'Target not available.' error appears. Was anyone able to get the feature to work? Or are we supposed to use another program if we want this feature?

0693W000000UxtPQAS.png

Thanks,

David.

15 REPLIES 15
JMark.1
Associate

Hello @DHama.1​ , I think Live Expressions will do the job 🙂

0693W000000VAewQAG.jpg

DHama.1
Associate

I tried that option as well, when I insert any variable inside it I'm getting "This feature is not supported" in the value column. Is there anything special I need to do to make it work?

It looks like you are using OpenOCD which does not support Live expressions. You need to switch the debug probe to either ST-Link GDB server or J-Link, they both support the feature.

Hello Markus. Is this still true with the newest update? It says Improved OpenOCD supporting: Live expressions. But I still get the "This feature is not supported" when connecting over OpenOCD. Is there anything i need to do in addition?

Hi, glad you read the release note. Indeed, it is now possible from STM32CubeIde 1.5.0 to use Live variable watch with Openocd.

You must use global variable and add them in the Live variable view.

Rgds,

Laurent

Thanks for the quick reply! Do you mean global variables in the code, or am I missing something? Because in the code they are global. Live Expression works when using ST-link locally, but not when connecting to the remote targets (they use openocd and jtag). I do however get variables and expressions when i pause

Yes, in the code, variables that are declared out of main() function.

And is it working with STLink gdb server on remote targets ?

Which openocd did you take to do your tests ?

You must use the one in CubeIde plugins and the cfg files that goes with it to make it work.

Rgds,

Laurent

I use the openocd compiled from source, as it is run on a raspberry pi. Is there any way to get the cubeIDE version on a pi? When i tried with the cube-provided openocd cfg i got Error: invalid command name "st-link"