完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我用cy5672过程可远程控制参考设计工具包,我试图理解代码到底。所以我的想法是做调试,看代码是如何工作的。但是,当我在调试模式,并尝试做的一步一步,我落在系统中断的一部分。我在这里的这个问题,认为这是“正常的”(这是一个已知的行为),如果我想我必须使用这一解决方案的调试(看到这个解决方案案例:调试系统中断的问题):“出路:当在断点、单步中断时禁用,前执行Run命令再次启用它们。菜单中有一个图标用于中断。或删除断点,设置一个新的在你想停止下一行,然后执行运行命令“虽然,当我试图实现的第一个解决方案,我在断点处(与中断现在禁用),我要一步一步做,碰巧代码跳转到另一名解放军总工程师。而且,如果我继续一步一步给我这个错误做一步:“调试程序意外退出运行期间。遇到错误(目标分离的更多信息见。输出窗口)”的其他解决方案,我将断点设置一个新的接近前一个代码应该去,但是当我执行运行命令不能到达那里。例如,在附件的图当我执行运行命令应该停止在断点设置,但从来没有到达那里。只有到如果一个键被按下了,但应该已经到了在前面的情况下(因变量i***atterylow有价值0、变isactivitiydetected有价值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?
|
|
相关推荐
9个回答
|
|
欢迎来到论坛,沃尔特。
通常调试是恰恰相反:如果检查程序运行如预期;-) 我已经放弃调试任何生成的代码模块。没有必要去了解它是如何工作的,我认为它会工作。 一些提示:在项目建设设置>;>;ARM GCC - >;编译器设置优化为“无”。这将确保程序的流程是完全一样的代码反映了。此设置将消耗更多的闪光但你可以设定一个文件库。 睡眠模式会影响调试,因为芯片和USB之间的通信不再。所以要通过代码检查是否需要禁用睡眠模式。 了解程序和程序流程可以以不同的方式来做:左键单击函数调用并选择“转到定义”。这会为你带来的功能本身,你可以看看它。“<;Ctrl & gt;”(控制减)将带你回到你来自哪里。学习这些东西的好方法。要知道你有机会显示调用堆栈,所以你可以看到在你进入函数断点所在。 快乐编码 鲍勃 以上来自于百度翻译 以下为原文 Welcome in the forum, Walter. Usually debugging is just the other way: checking if a program runs as expected ;-) I have given up to debug any of the generated code modules. There is no need to understand how it works, my assumption is that it will work. Some more tip: in Project -> Build settings -> ARM GCC -> Compiler set the optimization to "none". This will ensure that the program flow is exactly the same as your code reflects. This setting will consume more flash but you may set that on a file base. Sleep modes will interfere with debugging, because the communication between the chip and USB ceases. So go through the code and check whether you need to disable sleep modes. Understanding programs and program flow can be done in a different way: left click on a function call and choose "Go to Definition". This will bring you to the function itself and you may see what it does. A " Happy coding Bob |
|
|
|
|
|
|
|
你好,
鲍伯当我说我需要了解这个工作是因为我想做一些修改的代码,如果有问题的代码,我需要做调试明白我是错的。做“去定义“不要帮我检查哪里是我的错误。所以,首先,我想做调试不改变代码来理解这个我上面解释的。 所以,我想实现你给我的提示,但仍继续给我,我上面提到的问题。我将把我的项目,看看你能不能帮我,看我做错了什么。这个项目包含了你告诉我做提示(禁用睡眠模式和设置优化为'无'我感兴趣的一些文件),和我做的一些评论。 我用Psoc Creator 3.3。 如果可以的话,请帮帮我。 当做, 沃尔特 CY5672A遥控器 5.4兆字节 以上来自于百度翻译 以下为原文 Hi, Bob when I said that I need to understand how this works it's because I want to do some adaptations to the code, and if have a problem in the code I need to do debug to understand where I did it wrong. Doing "Go to definition" don't help me to check where is my error. So, in first, I tried to do debugging without change the code to understand how this works as I explained above. So, I tried to implement the tips that you gave to me, but still continues to give me that problems that I mentioned above. I will attach my project to see if you can help me with this, and see what I'm doing wrong. This project contains the tips that you told me to do (disabled sleep mode and set the optimization to 'none' in some files of my interest), and some comments done by me. I'm using Psoc Creator 3.3. Please help me if you can. Regards, Walter |
|
|
|
“我用Psoc Creator 3.3”
这是主要问题,升级到创建者4并更新项目的组件。 在生成一个新的版本之后,对生成代码的更改会被改写,所以最好避免这样做。 鲍勃 以上来自于百度翻译 以下为原文 "I'm using Psoc Creator 3.3" This is the main problem, upgrade to Creator 4.0 and update your project's components. Making changes in the generated code will get overwritten after a new build, so it's better to avoid that. Bob |
|
|
|
ncmza 发表于 2019-1-11 11:22 你好, 所以我卸载了CyPress的所有软件,并安装了PSoC创建者4并更新了所有的组件。这个问题仍然存在,并且随着你的提示被提及,问题仍然存在。我将再次附上这个项目。如果可以的话,帮帮我,我真的需要这个。 最好的问候, 沃尔特 CY5672A遥控器 5.4兆字节 以上来自于百度翻译 以下为原文 Hi, So i uninstalled all the software of cypress, and installed the PSoC Creator 4.0 and updated all the components. The problem still persists, and with your tips mentioned upwards the problem still exists. I will attach again the project. Help me if you can, I really need this. Best Regards, Walter |
|
|
|
在平台,H线64,你错误地评论了McCuExosiLype禁用。
鲍勃 以上来自于百度翻译 以下为原文 In platform,h line 64 you wrongly commented MCU_DEEP_SLEEP_DISABLED. Bob |
|
|
|
你好, 是的,鲍伯,你说得对,我忘了在这个新项目中改变这一点。但我仍然继续着同样的问题… 以上来自于百度翻译 以下为原文 Hi, Yes Bob you are right, i forgot to change this in this new project. But I still continue with the same problem... |
|
|
|
|
|
|
|
你好,
我已经找到了解决方案,所以解决这个问题的方法是禁用平台上的WDT。h,按照我在第一篇文章(1)中所指出的步骤,我最初所说的不起作用。不管怎样,谢谢你鲍伯帮助我。 当做, 沃尔特 以上来自于百度翻译 以下为原文 Hi, I already figured out the solution, so the solution to this was to disable WDT in Platform.h and following the steps indicated in my first post (# 1) that I initially said did not work. Anyway, thank you Bob for trying to help me. Regards, Walter |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2073 浏览 1 评论
1828 浏览 1 评论
3642 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1764 浏览 6 评论
1515 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
513浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
364浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
413浏览 2评论
360浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
865浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 16:57 , Processed in 0.877101 second(s), Total 62, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号