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?
Can you please check if your debug options is as follows: (Tools -> Options -> Program/ Debug -> General )
Also you can find where the assertion failed using the global variables cy_assertFileName and cy_assertLine.
Please let me know your observations.
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.
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:
2. It would be really helpful if you could do a erase all flash using PSoC Programmer and give the following screenshot:
3. Is it possible for you to share your project file so that we can try to debug the project in our side?
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.
3: No, I can't post proprietary code in a public forum.
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.
I can't provide the filename because that would reveal proprietary information. And how would providing the filename help diagnose this problem?
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()?
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?
4: This always happens.
6: Checking if a variable is nonzero.