cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ Creator & Designer

trtr_1961036
New Contributor

I have a compilation error on psoc creator 4.4 between break point and no break point

Environment:
PSoC Creator 4.4 (4.4.0.80)
Culture: English (United States)
OS Version: Microsoft Windows NT 10.0.18363.0
CLR Version: 4.0.30319.42000

when there is a break point in file c . run debug the program pointer is wandering. Even though the main program doesn't have any lines of code

result when i run debuger

trtr_1961036_0-1637648499439.png

no lines of code in main.c

trtr_1961036_1-1637648630512.png

cause break point in code

trtr_1961036_2-1637648739120.png

//========================================================= =============================//

after removing break point .compiler program translates correctly

trtr_1961036_3-1637648810650.png

and result when i run debug.i work perfect

trtr_1961036_4-1637648838749.png

 

0 Likes
5 Replies
Aashita_Raj
Moderator
Moderator

Hi @trtr_1961036 ,

Can you please attach your project here? This issue might be relevant to the program specific issue. This will help us understand it better at our end.

Best Regards,

Aashita

 

0 Likes
trtr_1961036
New Contributor

sorry the project is quite big with many files. but there is not any code in main.c

0 Likes
MotooTanaka
Esteemed Contributor

Hi,

I have downloaded and compiled your project.

The size is surprisingly small, as you have only 
CyGlobalIntEnable;

and

for (;;) {}

001-code-size.JPG

I suppose that all the rest was optimized out by the compiler.

So at least you need to call/use a function in which you'd like to place a break point in the debugger.

moto

0 Likes
trtr_1961036
New Contributor

because of compilation error between break point and no break point, i commented all code in project. when running the whole program, sometimes i get crash for unknown reason. After a few days of debugging, I found out because there is 1 break point left in the program tab.remove it,the program works perfectly.so in the demo project I comment all the code to prove it compile error.program pointer the program will point incorrectly when you debug the project even though the program does nothing

0 Likes
MotooTanaka
Esteemed Contributor

Hi,


Although the title says "PSoC creator compile error", since you can enter a debug session,

compilation can be done without error (message), right?


So I suppose that your problem is "Wrong or strange debugger behavior", correct?

 

First of all, I don't think that we can "debug" a function which is not actually called and therefore not linked in the object.
Second even if the object is linked, if the program pointer does not step on that line of code, break points will not do much good.
Third, in my case, I had very bad experiences when the programmed object and the debugging project was different.

So for the time being, I would recommend you to turn off the compiler optimization and test if the behavior of debugger improves by Menu
Project > Build Settings > ARM GCC xxx ... > Compiler > Optimization
Optimization Level -> NONE

moto

0 Likes