cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMonitor: how to access public variables in a base class?

NGalin
Associate II

Hi,

I'm trying to use CubeMonitor to access public variables of a base class, and CubeMonitor doesn't see them.

The general structure I have is:

class Base {

public:

int var_1;

int var_2;

}

class Derived: public Base {

public:

int var_3;

int var_4;

}

When I load the corresponding *.elf file into CubeMonitor....

I can see:

instanceDerived.var_3,

instanceDerived.var_4

but I can't see:

instanceDerived.var_1,

instanceDerived.var_2

I expect that "public" variables in the base class should be "public" variables in the derived class. Why can't I see them? Is there something I'm doing wrong?

Best,

Nat

1 ACCEPTED SOLUTION

Accepted Solutions
BParh.1
Senior III

Is there typo here?

var1 -> var_1

var2 -> var_2

View solution in original post

2 REPLIES 2
BParh.1
Senior III

Is there typo here?

var1 -> var_1

var2 -> var_2

NGalin
Associate II

Hi @BParh.1​ - yep, thanks for picking that up. That's just a typo. Fixed it up in the question now.