We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Using the watch or memory debug windows, does anyone know of a way to view a pointer as if it were an array?
i.e.
uint8_t myArray[4]; uint8_t* myPtr = myArray;
Normally, you'll only be able to see myArray[0] when viewing myPtr in the debugger. I'd like to view the entire array. Visual Studio offers a way of essentially casting the pointer inside their debug window into an array - is there anything similar that's available in uVision?
Here's the example of how to do it in VS: blogs.msdn.microsoft.com/.../
thanks!
Hey Brian,
I like that feature, too. As an work-around to the lack of it, you could create a debug function (under Debug->Function Editor). Save it to a file and just import the file in the command window, then call some_name() any time you want to get an update on the values in the array.
pseudo code:
FUNC void some_name(count, * to_first_element){
for(int i = 0; i < count; i++){ printf("%#x,", *to_first_element); } }