完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,因为我在一个当前无法调试的问题上用启动代码(HTTP://www. McCHIP.COM/FUMMS/M102267.ASPX作为参考),我想知道是否有任何方法启动调试器而不写入任何芯片的内存呢?我需要设置的条件来查看正在发生什么,依赖于引导闪存的特定状态,程序闪存和配置位,因此在MPLAB中进行调试以破坏该状态。如果这是GDB,我将确切地知道要做什么。有没有办法超越工具来防止加载?只能是命令行,如果你喜欢的话。我只需要让它出现在重置向量上,并且让我能够单步执行并查看特殊函数寄存器值。
以上来自于百度翻译 以下为原文 Hi folks, As I'm stuck on a currently un-debuggable issue with startup code ( http://www.microchip.com/forums/m1028297.aspx for reference) I would like to know if there is any way to start the debugger without writing to any of the chip's memories at all? The condition I need to set up in order to see what's going on relies on a particular state of the boot flash, program flash and configuration bits so hitting debug in MPLAB destroys that state. If this were gdb I would know exactly what to do. Is there any way to override the tools to prevent loading? Can be command-line only if you like. I just need to have it come up at the reset vector, and give me the ability to single-step and view special function register values. Any help greatly appreciated! |
|
相关推荐
7个回答
|
|
哪一部分?为什么不能在重置向量上设置断点?我以前做过。对于至少8位的部分,调试器不会改变任何内存,所以我不确定您的关注点是什么。
以上来自于百度翻译 以下为原文 Which part? Why can't you just set a breakpoint at the reset vector? I've done that before. For 8 bit parts at least, the debugger doesn't change any memory so I'm not sure what your concern is. |
|
|
|
哎呀,对不起。PIC32 MZ1024EFG100。此外,我有一个真正的冰和一个ICD4,如果这有任何区别。我试图找出正在发生什么与引导序列和结果BFSWIT位在NVMCON,为了使它进入的状态下,bfSWAP应该是1(而不是)我必须有我的启动代码在两个引导闪光P工件,并设置序列,以便在复位时映射上部区域。我不知道用MPLAB来实现这一点,因为启动闪存总是在调试模式下运行的(它在项目选项上这样说,您可以选择哪些内存被编程)。我只想在没有加载的情况下执行,并在重置向量上进行破解。
以上来自于百度翻译 以下为原文 Whoops, sorry. PIC32MZ1024EFG100. Also I have a Real ICE and an ICD4 if that makes any difference. I'm trying to figure out what's going on with the boot sequences and the resulting BFSWAP bit in NVMCON, and in order to get it into the state where BFSWAP should be 1 (and it is not) I have to have my startup code in both boot flash partitions, and the sequences set so that the upper region will be mapped at reset. I don't see any way of achieving this with MPLAB because boot flash memory is always programmed when running in debug mode (it says so on the project options where you can choose which memories are programmed). I just want to execute without loading, and break at the reset vector. |
|
|
|
MPLAB设置会在断开重置向量时做你正在寻找的吗?工具& gt;选项& gt;嵌入式调试重置@:重置向量调试启动:在复位向量停止,也有一个“实时连接调试主项目”,可能是你正在寻找的,但我不知道需要的规则/工具来工作。对我来说总是很苍白。
以上来自于百度翻译 以下为原文 Would the MPLAB Settings do what you're looking for as far as breaking at the reset vector? Tools>Options>Embedded Debug Reset @: Reset Vector Debug Startup: Halt at Reset Vector There's also a "Live Connect Debug Main Project" that could possibly be what you're looking for but I don't know the rules/tools needed to get that working. It's always greyed out for me. |
|
|
|
将它设置为允许我单步执行CRT0.S,但由于启动调试会话擦除了上机引导段,所以它破坏了我正在调试的条件:
以上来自于百度翻译 以下为原文 Setting it up like that does allow me to single-step through my crt0.s, but since starting the debug session erases the upper boot segment it destroys the condition I'm trying to debug :( |
|
|
|
是否可以在不替换引导闪存内容的情况下调试PICS?调试器依赖于在记忆领域中放置某种特殊的调味品吗?
以上来自于百度翻译 以下为原文 Is it even possible to debug PICs without replacing the contents of boot flash? Does the debugger rely on putting some kind of special sauce in that area of memory? |
|
|
|
对。对于PIC32 MZ族,调试执行器驻留在保留的BFM区域中。正是调试器在下载固件的调试版本时注入这段代码。此外,对于调试运行,需要将调试器配置为ON Prima-COMPIG调试,这也是由调试器完成的。在数据的最开始需要保留少量的数据内存。我读过您的前一个线程,但犹豫不决地评论。我不使用和声,所以也许人们使用和睦生活更新可以评论这一点。我不明白的第一件事是为什么你需要一个定制的启动代码。编译器已经提供了两个函数,即γON-Read()和γON-BooTrSpApple()。你可以把你自己的代码放在最早的地方。在你到达主()之前,你可以做一些事情。虽然我从来没有测试过,但我猜想Ion ONREST()是您应该检查BFSWAP位并相应地设置PFSWIT的地方。
以上来自于百度翻译 以下为原文 Yes. For the PIC32MZ family, the debug executive resides in a reserved BFM area. It is the debugger that injects this piece of code while it is downloading the debug version of the firmware. Also, for the debug to run, #pragma config DEBUG needs to be set to ON, which is done by the debugger as well. There is a small amount of data memory that needs to be reserved at the very beginning of the data. I read your previous thread but hesitated to comment. I am not using Harmony so perhaps people using Harmony Live Update can comment on this. The first thing I don't understand is why you need a custom startup code. The compiler already provides two functions, namely _on_reset () and _on_bootstrap(). _on_reset() is where you can put your own code at the earliest possible point. _on_bootstrap() is where you can do something before main() is reached. Although I have never tested, I would guess _on_reset() is where you should check the BFSWAP bit and set up PFSWAP accordingly. |
|
|
|
啊。谢谢您的确认。我想知道,是否有某种方法可以将调试会话设置为在两个引导分区中都具有调试BFM,具有不同的序列,以便至少我可以跳过并查看发生了什么事?我确信这不是唯一的方法-老实说,我不知道关于ON One REST(),所以我会尝试,看看我是怎么回事。谢谢你的回应!
以上来自于百度翻译 以下为原文 Ah. Thanks for confirming. I wonder if there's some way I can set the debug session up to have the debug BFM in both boot partitions, with different sequences, so that at least I can step through and see what's going on? I'm sure it's not the only way to do it - to be honest I didn't know about _on_reset() so I'll try that and see how I get on. Thanks for your response! |
|
|
|
只有小组成员才能发言,加入小组>>
5248 浏览 9 评论
2037 浏览 8 评论
1957 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3218 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2265 浏览 5 评论
788浏览 1评论
679浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
608浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
685浏览 0评论
582浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-28 05:27 , Processed in 1.382952 second(s), Total 87, Slave 71 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号