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

So you don't use CubeIde to debug ?

The Live variables view (the subject of this thread) is on CubeIde, I think you should post a new thread and question how to use openocd to do what you want to do.

If you use the latest openocd, there has been a recent change to be able to use several gdb connections.

But you must specify it in target cfg (-gdb-max-connections 2) because the default is only one connection allowed.

Rgds,

Laurent

No i use CubeIDE on my host computer. But since it now supports remote, I want to use CubeIDE on my computer, connected remotely to a raspberry pi with stlink/jtag (i have both) to the actual STM32 chip. That way my computer doesn't have to be physically connected to the STM32 device.

I have gotten everything to work except the live variables, where if i try to use the Cube-generated config (that uses stlink-dap.cfg and dapdirect_swd), i get the error described in the previous post

OK, so to try your cfg and your openocd, see in your target cfg that you have this option (-gdb-max-connections 2) added in target create.

And try to see if live variables work then.

If not, update your openocd to have this feature (commit is merged a month ago since 4 November 2020)).

Rgds,

Laurent

Olivier GALLIEN
ST Employee

Hi @EHyld.1​ ,

Live Watching is claimed as new feature of the latest STM32CubeIDE release V1.5.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Gudgel.boB
Senior

Is there a way to adjust the live expressions update frequency ?

What is it by default ? I cannot seem to find how to change its sampling rate or what the rate actually is.

It works is all I know.

YoungXuan
Associate

Two Steps:

1 Project-properties-C/C++build-Setting-McuGccCompiler-Optimization-None(-O0)

2 move the variable to globle (out of main)as static.

That's all.