- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I wonder if other people are also having problems with the debugger in PSoC Creator 3?
I am currently debugging a very basic USB project on the PSoC 5 LP Development Kit and there are some strange debugger disconnects when stepping through the code. Or sometimes I am not able to pause the program anymore while it runs and the debugger reports an error.
Regards,
Anguel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe just create a case with Cypress:
“Support”
“Technical Support”
“Create a Case”
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I thought it would be a good idea to post here first and to receive feedback from other developers before contacting support. I found a similar discussion about the older PSoC Creator.
Also, I don't like contacting support because everything gets handled behind the scenes and other developers can't benefit from it. Actually I have the impression that there are very few people posting here which is the bad sign for a very small community.
Thanks anyway, if I don't get any other replies I will have to contact support as usual.
Regards,
Anguel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Postings here in this forum are relatively common, not only a few. Just add the post-numbers from the first tree contributors showing about 250 posts per month.
A technical answer may take a bit longer than answers in the forum due to different time-zones and a one-to-one conversation.
Of course you are invited to keep us informed of the result.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe I should have elaborated why I did send you to the Cypress support team...
Normally Creator is stable - most issues with debugging are due to power supply issues. But none of the contributors here is able to debug it (there are some Cypress Emplyoees here, though). And since you provided not more information, it looks like we cannot give you proper help to solve your problems. Opening a support case is the fastest way to get help, since you (hopefully) directly get a contact with the capability to help you.
Btw: its a good style here to post the results of a support case, so others can look at it in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update: Looks like the problem is not USB related as it also appears on the VoltageDisplay_DelSigADC example for the PSoC 5LP Kit wit PSoC Creatror 3. After halting / resuming the program a couple of times in the debugger it cannot be halted anymore, so I have to stop the debug session. I either get no error message or I get:
Error: dbg.M0015: Debugger exited unexpectedly during run. Encountered error (GDB encountered an error and had to close)
This is on PSoC Creator 3 with Win 7 64 bit. I have now tested in PSoC 2.2 on my old Win XP and everything seems to work fine there. I will now install PSoC Creator 3 on XP to test again. I have also contacted Cypress but they have not provided any hints so far.
BTW: Today I received a Creator update. If I remember correctly, before the update the debugger first stopped in some init file instead of main(). After the update this seems to be fixed.
Regards,
Anguel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So I checked the debugging with PSoC Creator 3 on my old Win XP Laptop, again with the original VoltageDisplay_DelSigADC example project.
After a couple of halts and resumes the debugger stops responding, i.e. it cannot be halted anymore. So it must be a bug in the Creator software or the PSoC 5 LP Kit, not my PC as the problem occurs on Win7 64bit as well as on WinXP 32 bit on completely different computers.
Anguel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
UPDATE: Cypress confirmed the problem, looks like a race condition in the debugger. They are working on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All
I use GCC4,41, and now 4,73, with different machine and project, write from me or others guy..
With creator 3, in debug mode i see the following problem.
A)The debug don't start on " main" routine , but in an fixed point in some part of the code.
With F10, become jump from on line to anothers without any significance.
In Window dissasembly, in effect with F10 follow a line by line without jump, but the code is unrelated with the code write on the file, that i try debugging.
B)Sometimes a code that is debugged correctly, without any problem, became also do the same things.
FOR COME BACK TO DEBUG , i begining cut some part of code.and the problem persist.
BUT, if you paste the code that , is cutted before , all come to work.
A very generator of ansiety.
C)I see that gcc, don' like some bitfield definition, like uint8 foo:1; , after this cure, the things run a little better.
D)The solution of open a case, don't work with me , the guy was able to see the problem, but the solution was, use the MDK compiler (2-3000 $).
I want share this expereience with others people, maybe some ligth come on the oscure world of gcc and creator.
Maybe some take some help from what i see.
Best regards to all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since most of us do not have that bad experience I would suggest you to upload an example-üroject (with Creator's "Create Workspace Bundle) that shows your mentioned error.
The fact that sometimes the disassembly is out of sync with the sourcecode is a known bug and seemingly has to do with optimization compiler flags,
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the optimization does cause problem and the problme with the problem with debugging has been there for a while.
One thing we do is turn all optimization off and just use the bigger chip if running out of room. ( Not ideal but not big problem for our project, may be more important for other projects that every cents counts).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All
I have always used level optimitation = None, and the problem is present, also in this moment.
I make the project bundle, in this project i use the keypad from Bob with some little modifie (i have a keyboard matrix with diode).
But this is influent.
I Have plenty room of rom and ram.
I become suspect that, i have some basic mode of programming, that gcc don't digest.
I hope that looking on my code, maybe come some evidence.
Any suggestion be very appreciate.
Best to all.
Giovanni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can't find anything but would think that using longer variable names to include more details of the usage may help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
About the debugging issue.
I remember that most oftern happen near the end of a IF statement,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
My debugger can't be paused during debugging and hence, I can't test and debug my code. I am using CY8C4124AXI-443 PSoC. Is everyone facing the same problem with mine?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome to the fascinating world of PSoCs!
Are you using a Prototype Kit CY8C40-41xx connected via USB to your PC? Then there is no debugging possible.
When you are using a Pioneer Kit (you should choose that with the PSoC CY8C4245, not 41) debugging works via USB.
When you have got a MiniProg3 you can debug all PSoC 3, 4 and 5-es.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm using CY8CKIT-042-BLE (with PSoC CY8C4247) and I didn't find a way to make the debuger working. I follow instruction of document related to this evaluation kit but the program never breaks if I put break point on main function. On "memory 1" tab I can see "Unavailable, no debug session active" written in grey.
I have made an update of the firmware of the KitProg Version from 2.10 to 2.11 but nothing change.
The PSoC creator 3.1 is installed on a Win7 64 bits computer.
Thanks in advance to help me !
Regards,
Damien
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum, Damien!
Ok, so step-by-step.
Connect your BLE-Kit via USB to your PC (Wait for any installation messages close)
Start Creator
Load an example project for your kit. When there are more than one projects in the workspace, activate the PSoC4 BLE one
click on the bug-symbol in the menu-line to start debugging. When a debug-target dialog pops up make sure that your device and the presented device match.
System should now create the project, program the device and starts debugging by stopping at the first executable line. if it does not stop there something with your clock definitions are wrong.
If all fails, consider uploading your complete project. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank Bob for your answer.
In fact I was using an exemple "PSoC_4_BLE_CapSense_Slider_LED" and the problem come from Debug function disabled to consume less energy.
Answer: Project.cydwr -> System -> Debug Select -> SWD
Regards,
Damien
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fine to hear that you got it working!
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems like this post is resolved. Nevertheless, I will add a comment from my experience. If you have a peripheral device changing stuff in the background (e.g., a multiplexer or filter in real time), the debugger has no chance of keeping you apprised of all that. By the time you step to the next line of code the situation in real time has changed.
Don't expect too much of the debugger.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The debugger works like any usual other debugger:Setting Breakpoints, inspecting and setting variables and controlling the call stack. The problem you are facing is: PSoCs are not like any usual other embedded. Within a PSoC is independent hardware running (the components) and they of course are out of reach of the access of a debugger.
So what you have to keep in mind is that a atopped CPU does not imply a stopped hardware.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think its kind of the same with other, simpler MCUs - even they have some independent periphearls (think timers and counters). They also change state when the software has stopped.
The big difference with PSoC is, since its configurable hardware (both digital and analog) is so much more powerful , many projects end up with a considerable amount of logic in the hardware. And that something the current debugger cannot support that well.
In most cases I route some interesting internal signals to GPIOs, where I either can attach a scope, logic analyzer or just some LEDs to signal current state). One can get quite far with such simple measures...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm going to make Data logging system through PSOC 4BLE, I want to debug 4 programs in PSOC but when i debug 1program it will work but other is not working. How can i debug 4 program in my PSOC 4BLE .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm using PSOC4 BLE, I want to know that how can we debug multiple programs in our PSOC board, When i feed 1 program in it & want to program again then last program will not work, SO how can i debug it with multiple programs. How can we add a log file in PSOC creator .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thread being handled here -
http://www.cypress.com/forum/psoc-4-ble/debug-multiple-programs
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the easy question but I'm a newbie to PSoC3. I just want to know where we can see the program flow time in cypress?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
There is no "program flow time" this seems to be a job for a profiler, but when you halt program execution you can see a "Call Stack" that not only shows where you halted, but additionally how you got there.
Bob
PS: Not a good idea to hijack a one year old answered thread. Next time better create a new one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, old thread, but still a good reference point.
Happens to me from time to time, totally unrelated to optimizations and build/rebuild. The only "solution" I've found is to restart PSOC Creator and Miniprog3. Rebooting the OS should not be of any use, unless the Miniprog3 USB "driver" is hung.
PSOC 3.3CP3 + PSOC5LP + custom hardware + Miniprog3 + SWD.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Happens to me from time to time," Sorry, Giuseppe, but what happens to you from time to time?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry Bob, didn't see your reply.
What happens (randomly, it seems) is:
- The miniprog3 connects to the device correctly but when I halt the execution it always stops into a power management function (sorry, I didn't write down the function name). Power management (that is sleep/hibernate) as you can find in cyPm.c is not used in the project. In fact if you let the firmware run, disconnect miniprog3 and restart psoc creator the next time it will show the real position in the program.
- Creator reports an "unexpected disconnection" once you try to enter a debug session
As I said, readdressing the miniprog3 (dis/connect from USB controller) and restarting creator has always solved the issues so far.
Anyone knows if there's a creator log somewhere? Can be useful to understand what's going on.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anyone knows if there's a creator log somewhere? Yes, when you start Creator there is the location of the log file shown in the output window.
It (the power management function) is not used in the project. This I doubt (not assuming you clobbered the stack). Set a breakpoint at entry to the pm function and analyze the call stack. Keep in mind that debugging and deep sleep or other power saving do not go together!
If you like, post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, saw that log but it's only what you get in the Output window. As far as I can see it's nothing that can be used to understand what's going wrong inside creator (i.e. what system call failed and why).
The PM functions are not directly used in the code. Cypress startup code CyIMO_Start and CyXTAL_Start call in turn CyPmFtwSetInterval and CyPmReadStatus, but CyIMO_Start and CyXTAL_Start are not called anywhere and in fact optimized away by the linker (lx51).
And no, I don't have the authorization to publicly post the project, sorry. But it's really nothing magic and there are no special tweaks anywhere.