2020-04-03 08:16 AM
I can't really see how the "Expression" window in the STM32CubeIDE in Debug mode is interpreting arrays.
I have an array "receiveData" with 7 uint8_t elements that I receive via UART.
When I check out this array under "Expressions" I see that the array has 7 elements, just as expected. But while the value is != 0, all array elements are shown with value 0! I would have expected the first to Hex-digits from "value" belonging to element 0, the next two digits to element 1 and so on.
And in the detailed window at the bottom of the screenshot it only shows 6 times "\0" under details, not 7 times.
So my two questions are:
Solved! Go to Solution.
2020-04-03 08:41 AM
The Value for receiveData is the address of the array, not the values within the array.
It has 7 elements, which matches the definition. The first element is index 0.
2020-04-03 08:41 AM
The Value for receiveData is the address of the array, not the values within the array.
It has 7 elements, which matches the definition. The first element is index 0.
2020-04-03 08:46 AM
Oh right, it is the address, that makes sense.
But still, under "details" it does show only 6 elements, not 7.
2020-04-03 08:48 AM
Looks like it's interpreting it as a string and leaving off the terminating null character, but including null characters "within" the string. Who knows.
2020-04-03 09:46 AM
I guess that makes sense. OK, thanks for the quick answers!
2020-04-03 01:01 PM
help some project on git u-blox NUCLEO-64 STM32L476RG
2020-04-03 01:02 PM
some project on git u-blox NUCLEO-64 STM32L476RG