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.
I've worked with a DSP project where I needed to print the values of functions out. What I did was added functions to the ini file listed at the Options for Target - Debug tab's Initialization File field. If you don't have one, just use a text editor to create it and save to as file_name.ini. The functions acted as wrappers for the stdio printf. There was an array, output[1023], being used with fft functions that I was interested in. In one context the first 512 elements were interesting, in another, all 1024 were interesting.
.ini contents:
FUNC void print_output512(void){ unsigned int i; printf("BEGIN OUTPUT 512\n"); printf("BEGIN OUTPUT 512\n"); printf("BEGIN OUTPUT 512\n"); for(i = 0; i < 512; i++) { printf("%f\n",output[i]); } } FUNC void print_output1024(void){ unsigned int i; printf("BEGIN OUTPUT 1024\n"); printf("BEGIN OUTPUT 1024\n"); printf("BEGIN OUTPUT 1024\n"); for(i = 0; i < 1024; i++) { printf("%f\n",output[i]); } }
If I recall correctly, you then compile and in debug use the command INCLUDE file_name.ini. Then you can set a breakpoint where your interested in viewing values and call the functions by name in the command window. You can copy and paste from here.