2021-01-09 10:25 AM
I declare this two variable globally
uint8_t data_rcv_flg[1] = { 0 }; /* To avoid reuse of data */
uint8_t run[1] = { 0 };
I use this variable here:
MODEM_ConfigTypeDef modem_cfg;
modem_cfg.buff = data;
modem_cfg.rcv_flag = data_rcv_flg;
PROTOCOL_ConfigTypeDef protocol_cfg;
protocol_cfg.run = run;
where in the typedef are declared as uint8_t *.
The variables are exactly the same but the debugger show me this:
I can't understand why this behaviour.
Can someone explain me?
2021-01-10 04:52 AM
The debugger shows you a variable "pointer to uint8_t". You have to derefernece the pointer to get to the data.
2021-01-10 04:55 AM
The same identical code but with "run" renamed to "protocol_run" now works.
I can't explain why.
2021-01-10 04:56 AM
And the same variable declaration in a empty project, with name "run", works.
It's possible that there is a name conflict?
2021-01-10 08:33 AM
It is up to the preprocessor /compiler to find thos conflicts. It would be strange if there are conflicts but no warning.
2021-01-10 12:50 PM
No idea of What could cause this error?
2021-01-10 03:03 PM
Have a look into the mapfile, how does the linker locate those variables.
JW