嗨,我用cy5672过程可远程控制参考设计工具包,我试图理解代码到底。所以我的想法是做调试,看代码是如何工作的。但是,当我在调试模式,并尝试做的一步一步,我落在系统中断的一部分。我在这里的这个问题,认为这是“正常的”(这是一个已知的行为),如果我想我必须使用这一解决方案的调试(看到这个解决方案案例:调试系统中断的问题):“出路:当在断点、单步中断时禁用,前执行Run命令再次启用它们。菜单中有一个图标用于中断。或删除断点,设置一个新的在你想停止下一行,然后执行运行命令“虽然,当我试图实现的第一个解决方案,我在断点处(与中断现在禁用),我要一步一步做,碰巧代码跳转到另一名解放军总工程师。而且,如果我继续一步一步给我这个错误做一步:“调试程序意外退出运行期间。遇到错误(目标分离的更多信息见。输出窗口)”的其他解决方案,我将断点设置一个新的接近前一个代码应该去,但是当我执行运行命令不能到达那里。例如,在附件的图当我执行运行命令应该停止在断点设置,但从来没有到达那里。只有到如果一个键被按下了,但应该已经到了在前面的情况下(因变量i***atterylow有价值0、变isac
tivitiydetected有价值1)。我使用的试剂盒提供远程控制,没有任何变化的代码。你能帮助我解决这些问题吗?我该怎么办?
捕获2.PNG
8 K
捕获1.PNG
52.9 K
以上来自于百度翻译
以下为原文
Hi,
I'm using the CY5672 PRoC BLE Remote Control Reference Design Kit, and I'm trying to understand what the code exactly does.
So my idea was to do debugging, and see how the code works.
But, when i'm in debugging mode, and try to do step by step, i fall on system interrupt part. I searched here by this problem and see this is "normal" (it was a known behaviour), and if I want to do debug I have to use one of this solutions (saw this solutions on case: System interrupt problem in debugging):
"Ways out: When at the breakpoint, disable interrupts when single-stepping, before executing a run-command enable them again. There is an icon in the menu for interrupts.
Or
remove Breakpoint and set a new one at the next line you want to stop, then execute a Run-command"
Although, when I'm trying to implement the first solution, and I'm at the breakpoint (with the interrupts now disabled), I try to do step by step and it happens that the code jumps to another place. Also, If I continue to do step by step it give me this error:
"Debugger exited unexpectedly during run. Encountered error (Target disconnected See output window for more information.)"
The other solution, I remove the breakpoint and set a new one close to the previous one where the code should go, but when I execute Run-command it doesn't reach there. For example, on the figure in annex when I execute the Run-command it should stop in the breakpoint that I set, but never has arrived there. Only arrives if a key is pressed again, but it should had arrived in the previous case (because the variable isBatteryLow had the value 0 and the variable isActivitiyDetected had the value 1).
I'm using the code provided with the kit for remote control without any changes.
Could you help me about these problem? What should I have do?