Skip to main content
NGalin
Associate II
May 21, 2021
Solved

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

  • May 21, 2021
  • 2 replies
  • 986 views

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

This topic has been closed for replies.
Best answer by BParh.1

Is there typo here?

var1 -> var_1

var2 -> var_2

2 replies

BParh.1
BParh.1Best answer
Senior III
May 21, 2021

Is there typo here?

var1 -> var_1

var2 -> var_2

NGalin
NGalinAuthor
Associate II
May 21, 2021

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