I have recently run into an issue with the debugger. Over half of the time I try to run my program within a debugging session, the processor fails to start. If I reset the program, it works. If I set a break point, the program will halt at that location, but then I am unable to step. Almost all of the time I am debugging, I am having to think of ways to work around the chip "hanging". It's completely bizarre. This occurs with two different MiniProg3 units I've used (rev A and B).
Now here's the fascinating part. If I revert my code back to an earlier version in which I did not notice the problem, debugging works as well as ever. So, something changed that is affecting debugging. I am only using 60% of the code space with debugging enabled.
Any thoughts on how an application could prevent the debugger from working?
I do not have creator at home, so not sure if PSOC4 is the same as PSoC5. But there is an icon on the tool bar to disable interrupts.
If there is, then disable the interrupt after the break point and you should be able to step. ( you may need to use 2 steps the fist time after first disable using the icon)
Yes, I am aware of these issues and debug with interrupt issues in mind. This is not what I am seeing in the latest revision of my code. I see all the halmarks for the above referenced debugging issues in the previous revision. This latest revision simply will not debug. I have never encountered a situation in which I could not start the program executing using the run button. I have always been able to pause and restart code at any point with the debugger. The behavior is presently so unpredictable so as to make debugging almost impossible.
I want to give an example. When I first start the debugging process, the PC points to the first instruction. I then press "run". Now I see nothing happening. I press "pause" and I am sent into the disassembly. The PC has stopped at 0x000003C2, which is the thirst instruction after main. I am hung at movs r3, #0. It doesn't matter if I press run again then pause, the PC never moves again.