2020-03-08 03:17 AM
I'm using VS 2019 with visualgdb extension for stm32f303vc device. I have a class TlteCom with array of pointers to members of the c++ 17 class. Here it is.
class TlteCom
{
public:
volatile uint16_t number=0;
volatile uint16_t paramNumber=0;
volatile char param1[20];
volatile char param2[20];
volatile char param3[8];
constexpr static uint8_t paramCount = 3;
volatile char *const paramlist[paramCount] = {(volatile char *)param1, (volatile char *)param2,
(volatile char*)param3};
volatile uint16_t paramlength[paramCount] = { 0, 0, 0 };
};
I create the object of the class as global variable as follows: TlteCom com;
I don't understand why com.paramlist members are all zero. if I create object of the TlteCom class on stack in main() function everything is ok: com.paramlist has right values of param1, param2, param3 addresses. So, what is the right initialization of pramlist array?
Help, please!
And thank u in advance!!!
Solved! Go to Solution.
2020-03-12 11:19 PM
here is interesting information about bcc command, may be it would be better to use bne command instead of bcc.
i don’t use Hal library that’s why I can’t tell u anything about it.
2020-03-12 11:22 PM
And I didn't see smthg like this ldr r2, =_sbss. Is there such code?