PSoC designer 5.1 debug strategies

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
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
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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