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

PSoC™ 6 Forum Discussions

euggersh
Level 4
Level 4
5 sign-ins First solution authored 50 replies posted

Running on a PSoC 6 from PSoC Creator 4.2.  I don't seem to get much of a stack in the Call Stack pane after a failed assert, which makes debugging extremely difficult.  While trying to find if others have run into this, I saw some examples where others had the full call stack available.  Is there some setting I'm missing?

pastedImage_0.png

0 Likes
9 Replies
euggersh
Level 4
Level 4
5 sign-ins First solution authored 50 replies posted

Any chance of someone from Cypress responding to this?

0 Likes
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi user_362267832​,

Can you please check if your debug options is as follows: (Tools -> Options -> Program/ Debug -> General )

pastedImage_2.png

Also you can find where the assertion failed using the global variables cy_assertFileName and cy_assertLine.

Please let me know your observations.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes

Yes, my debug options are set exactly as in your example.  And I understand that I can use those global variables to see where the assert failed, but that's not as useful as being able to click in the call stack and get context in each stack level.

0 Likes
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi user_362267832​,

Thanks for your quick reply.

1. From your screenshot, I see that your application didn't reach the main(). Can you please share the complete screenshot of the call stack window so that I can understand where your assertion fails? Something like below:

pastedImage_2.png

2. It would be really helpful if you could do a erase all flash using PSoC Programmer and give the following screenshot:

pastedImage_1.png

3. Is it possible for you to share your project file so that we can try to debug the project in our side?

Kindly update.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes

1:  I did share a complete screen shot of the call stack.  That's the entire point of this post.  Most of the call stack is missing on a failed assert.  Yes, execution had reached main.

2: 

pastedImage_1.png

3:  No, I can't post proprietary code in a public forum.

0 Likes
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi user_362267832​,

Thanks for the update. There isn't any additional settings for Call stack. Regarding point 1, I was looking for the values of file name and the line number. Can you please let me know the file where the assert failed?

Let me also check if we have any known issues with the rev of the device you're using.

Thanks,

Bragadeesh

Regards,
Bragadeesh
0 Likes

I can't provide the filename because that would reveal proprietary information.  And how would providing the filename help diagnose this problem?

0 Likes
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

hI user_362267832​,

I'm not able to reproduce your issue. Can you please help us resolve your issue by answering the following questions?

1. When you press the debug button, does the CPU halt at main()?

pastedImage_0.png

2. Are there any chances that you modified any of the boot files before main()?

3. Did the assertion fail in our boot sequence or was it your application code that failed?

4. Do you recall any changes that you made in your code that caused this assertion to fail? It will be really helpful in reproducing/ narrowing down the issue.

5. I requested for the file name just to know if it was our boot sequence that failed or was it your custom application.

6. Is it possible for you to tell us what was checked in the CY_ASSERT() that caused this?

Regards,

Bragadeesh

Regards,
Bragadeesh

1:  Yes.

2:  No.

3:  Application.

4:  This always happens.

5:

pastedImage_0.png

6: Checking if a variable is nonzero.

0 Likes