cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

HI Forum,

   

 

   

I'd like to know how to know the value of a variable after certain executions have elapsed. I tried "Add Watch" in the watch window under debugger - but the value of the variable remains as 0x0000 inspite of numerous Compile-Run iterations.

   

I'm sure that the increment occurs as I also toggle a LED inside the same block which I confirm using a DSO. 

   

 

   

Awaiting replies,

   

RAM

0 Likes
4 Replies
JoMe_264151
Expert II

RAM, do you own an ICE-Cube? Afaik only with that is it possible to inspect variables and set breakpoints with PSoC1.

   

Another hint is to turn off all optimization since a variable might be kept in a register.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

You need to pause the debugger to see the updated variable values or it can be invoked with a break point. 

0 Likes
Anonymous
Not applicable

 BOB,

   

 

   

Good to see you Bro! you were on a holiday ? Been some tym I got guidance from you! 🙂 

   

 

   

Alryt, coming to the point, I do have an ICE cube. Can you elaborate on how that optimization thing shud be done > ? 

   

 

   

Regards, RAM

0 Likes
ETRO_SSN583
Esteemed Contributor

Optimization is a setting for the compiler that you can turn off from

   

optimizing code. Used in debugging, when in production release

   

you turn it back on to minimize FLASH used and speed up routines.

   

Note it can affect timing, when you turn it off, depending if your rely

   

on SW loops for delay, etc...

   

 

   

Go to Project, Settings, Compiler, to change settings.

   

 

   

Regards, Dana.

0 Likes