PSoC Creator 4.4 Debugging issues with variables values

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

cross mob
alextkd94
Level 1
Level 1
First like received First reply posted First question asked

Hello,

 

I hope you are very fine..

I need your help, i have experimented some problems with PSoc Creator, i was programming simply bit operations, at the moment of i was debugging, the values that i expect to see in the watch, was incorrect, but i known that was no a problem from my code, then i leave only a simple code, where i assign a value to my variable, followed of a CY_NOP to place a breakpoint there.

When the program executions stops the values in the watch window doesnt match with the value assigned in my code in the line executed before the breakpoint execution.

psoc.JPG

 

psoc 02.JPG

This is making me crazy, this is the first time that this kind of issue happen to me.

I have tried, restarting my pc, disconnect and reconnect my Pionner kit and the problem keeps.

I hope you can help me, i going to appreciate a lot.

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Did you define this TempResultedo as "volatile" ?

Or since the variable does not seem to be accessed by other purpose,

the variable might have been optimized.

If you have not defined TempResultdo as "volatile",

I would suggest you to try defining it as volatile, such as

volatile int16_t TempResultdo ;

 

Or you could change the optimization level to NONE to stop optimization.

In the Project > Build Settings > ARM GCC 5.4-2016-q2.. > Compiler > Optimization

Optimization Level to NONE

 

moto

View solution in original post

2 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Did you define this TempResultedo as "volatile" ?

Or since the variable does not seem to be accessed by other purpose,

the variable might have been optimized.

If you have not defined TempResultdo as "volatile",

I would suggest you to try defining it as volatile, such as

volatile int16_t TempResultdo ;

 

Or you could change the optimization level to NONE to stop optimization.

In the Project > Build Settings > ARM GCC 5.4-2016-q2.. > Compiler > Optimization

Optimization Level to NONE

 

moto

Thanks fiend¡ I change the optimization leve as you indicate, and now works great.

Thanks a lot