When variables are put into registers for optimization you will not see a correct value in the debugger.
I would suggest to
set compiler optimization to "None" (Remember you can set build options on a file base!)
assign Sensor[sensorlocation] to a variable and check that in debugger
I did notice an issue with the way I declared the structs in the header files.
I thought I could declare the array variable in the header file without specifying the size like this "SensorType Sensor;" and then specify size of array in the C file. However, it seems I when I do this I cannot view the array in the debugger, but when I explicitly set size in header file I can see the array elements in debugger.
extern volatile SensorType Sensor[MAXSENSORS];
The purpose of C was not to make life easier, but more adventurous. ;-)
And don't we all love a good adventure :)
BTW: I am not getting email notifications for post replies since the Cypress web update, Is there an option hidden away somewhere I need to select?
1 of 1 people found this helpful
Sorry, I was being lazy, I found the setting in my Profile -> Forums