完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在使用MPLAB-X版本4.20与XC8版本1.45和18F86K90 CPU。调试这是不可能的。1)如果我设置断点,代码不会停止在我设置的行。它停在后面的线路上。这是一个大问题,如果我试图单步执行代码。如果在函数调用中设置断点,则代码在函数的第一行上断裂,然后如果我尝试单步执行,则单步返回到返回,但是如果我尝试使用“步进”按钮,则进入每个函数而不是跨过它。2)在某些行上。它不允许我设置断点,我得到“断点断点”符号,即使我的所有优化都变为OF3),我也会得到幻像断点。如果我运行程序,然后按下暂停按钮,下一次运行代码时,它似乎在前面一次运行时暂停了,但是断点窗口说没有断点,所以我不能清除它们。解决这个问题的唯一方法,甚至有时不起作用,就是退出IDE并重新启动它。这种组合使得调试几乎无用。
以上来自于百度翻译 以下为原文 I am using MPLAB-X version 4.20 with XC8 version 1.45 and a 18F86K90 CPU. Debugging on this is impossible. 1) If I set a breakpoint, the code does not stop on the line I set. It stops on the line after. This is a big issue if I am trying to single step the code. If I set the breakpoint on a function call, the code breaks on the first line of the function, then if I try single stepping, it single steps back to the return, but then if I try to single step using the step over button, it goes into every function rather than stepping over them. 2) On some lines it will not allow me to set a breakpoint, I get the "broken breakpoint" symbol, even though I have all optimization turned off 3) I get phantom breakpoints. If I run the program, then press the pause button, the next time I run the code, it seems to break on the line I paused on on the previous run, but the breakpoint window says there are no breakpoints, so I cannot clear them. The only way to clear this, and even this sometimes does not work, is to exit the IDE and restart it. This combination makes debugging almost useless. |
|
相关推荐
7个回答
|
|
更好地打破一个NOP,避免任何代码行可能转化为胸罩,GTO,呼叫或返回。
以上来自于百度翻译 以下为原文 Better to break on a NOP and avoid any line of code that might translate into a BRA, GOTO, CALL or RETURN. |
|
|
|
1)这被称为断点集结,这正是8位处理器工作的方式。经验丰富的8位工程师知道尽早设置断点一行,或插入一个NOP,并打破那里作为咖啡评论家建议。注意,SKID是一种汇编语言指令,所以当处理C代码时,它可能是棘手的,因为大多数C代码行生成不止一个汇编代码。2)为了在C代码行上设置断点,该C代码行必须实际生成汇编操作码。各种C行实际上不生成程序集(例如空白或注释行、{}s、变量声明等)。3)不知道那里发生了什么。
以上来自于百度翻译 以下为原文 1) This is called breakpoint skidding and is just the way the 8 bit processors work. Experienced 8 bit engineers know to set the breakpoint one line early, or to insert a NOP and break there as coffee_critic suggests. Note that skid is one assembly language instruction, so it can be tricky when dealing with C code as most C lines of code generate more than one assembly code. 2) In order to set a breakpoint on a line of C code, that line of C code must actually generate assembly opcodes. All sorts of C lines don't actually generate assembly (e.g. blank or comment lines, {}s, variable declarations etc.). 3) No idea what's going on there. |
|
|
|
这是PIC硬件行为的方式,被称为断点打滑:http://MyCHIPPrdult.COM/TLS0201:一个8位PIC中的SkID Effice断点,是一个寄存器,观察程序指针,在地址匹配时生成调试中断,但是指令已经执行。因此,调试器只在下一个指令之前获得控制。这可能位于调用的函数内,或者在跳转的目标中。当准备调试一些复杂代码时,可以插入Nop-();宏指令如咖啡评论家所解释的。一些代码行不创建任何指令。NS。如果没有与一行连接的指令地址,则调试器将无法设置断点。同样,您可以插入NOP();指令宏。迈西尔
以上来自于百度翻译 以下为原文 It is the way the PIC hardware behave, and have been called breakpoint skidding: http://microchipdeveloper.com/tls0201:skid-effect Breakpoint in a 8 bit PIC, is a register watching the program pointer, and generating a Debug interrupt when the address match. But then the instruction is already executing, so debugger get control only before the next instruction. This may well be inside a function beeing called, or at the target of a jump. When preparing to debug some complicated code, you may insert NOP(); macro instructions as explained by coffee critic. Some code lines do not create any instructions. If there is no instruction address connected with a line, then debugger will not be able to set the breakpoint. Again, you may insert NOP(); instruction macros. Mysil |
|
|
|
自7版以来,甚至在早期版本中,MPLAB都出现了幻像断点。就像它们出现的神秘一样,它们消失了。一种加速消失的方法是关闭MPLAB并重新打开它。
以上来自于百度翻译 以下为原文 Phantom breakpoints have occurred in MPLAB since version 7 and possibly even in earlier versions. As mysteriously as they appear, they disappear. One way to speed their disappearance is to close MPLAB and reopen it. |
|
|
|
|
|
|
|
这是仿真器还是真正的调试工具?模拟器不应该滑行。我使用MPLAB ICE调试(汇编)代码,它有一个选项,消除了被称为“软件断点”的打滑。我使用PIC24/DSPIC33部分来完成我们的所有项目,所以我从未尝试过用MPLAB ICE调试8位的部分。我不知道这个选项是否适用于8位部件。我讨厌打滑,当我想出这个选择时,我很高兴。
以上来自于百度翻译 以下为原文 Is this in the simulator or with a real debugging tool? The simulator should never skid. I use MPLAB ICE for debugging (assembly) code and it has an option that eliminates the skidding called "software breakpoints". I use PIC24/dsPIC33 parts for all of our projects, so I have never tried debugging 8 bit parts with MPLAB ICE. I don't know if that option is available for 8 bit parts. I hated the skidding, and was happy when I figured this option out. |
|
|
|
就像FIY一样。我切换了ToMPLAB-X版本3.61,这是我在更新之前使用的版本。(1)打滑仍在进行中)(3)断点现在正确地工作)。
以上来自于百度翻译 以下为原文 Just as an FYI. I switched to MPLAB-X version 3.61 This is the version I was using before updating. Now 1) The skidding still occurs 2) The step over now works correctly 3) The broken breakpoints now works correctly 4) The phantom breakpoints are gone Now debugging is at least usable. |
|
|
|
只有小组成员才能发言,加入小组>>
4926 浏览 9 评论
1876 浏览 8 评论
1817 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3018 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2106 浏览 5 评论
520浏览 1评论
375浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
426浏览 0评论
313浏览 0评论
IPECMD命令烧录AVR128DA48芯片,报找不到芯片错误
796浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-7-16 10:51 , Processed in 1.215726 second(s), Total 88, Slave 72 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号