cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

alextkd94
New Contributor

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
Esteemed Contributor

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
Esteemed Contributor

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

alextkd94
New Contributor

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

Thanks a lot