完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,今年早些时候,我在Atmel Studio环境中编写AVR微控制器。现在我想切换到PIC微控制器和MPLLABX,但是我发现有些东西如何工作有困难。目前,对我来说,问题是,我没有办法并排地看到我的C代码生成了什么汇编代码。此外,当我在模拟器中调试时,我想通过C代码和汇编代码互换步骤。例如,如果我中断C代码中的一个语句,我还想看看中断在生成的汇编代码中发生在哪里,并且从那时起能够逐步通过汇编指令。
以上来自于百度翻译 以下为原文 Hello, Earlier this year, I was programming an AVR microcontroller in Atmel Studio environment. Now I want to switch to PIC microcontrollers and MPLABX, but I am having trouble with finding how some stuff works. Currently, problem for me is that I do not see a way to see side by side what assembly code has been generated from my C code. Also, I when debugging in a simulator, I would like a way to interchangably step through C code and assembly code. So for example if I break on one statement in C code, I also want to see where does the break happen in the generated assembly code, and to be able to step through assembly instructions from then on. Could somebody point to me out what is the proper way to do this in MPLABX environment? |
|
相关推荐
11个回答
|
|
|
|
|
|
只有在调试会话中才可以使用Windows->Debug.->反汇编。我需要一个总是生成的列表文件。我怎么能做到这一点?
以上来自于百度翻译 以下为原文 You can use the Windows->Debugging->Disassembly only if you in a debug session. I need a list file which will always generated. How can i do this? |
|
|
|
Windows & gt;调试-gt;输出& gt;反汇编列表
以上来自于百度翻译 以下为原文 Windows->Debugging->Output->Disassembly Listing |
|
|
|
|
|
|
|
|
|
|
|
您还可以查看项目目录中的*.lst(列表)文件(只要打开“保留”中间文件和生成列表文件的选项),尽管它不会跟踪调试器/模拟器/断点,但是会显示实际生成的程序集代码以及c代码。
以上来自于百度翻译 以下为原文 You can also look at the *.lst (listing) file in the project directory (as long as you turn on the options to "keep" intermediate files and generate listing file) although it will not track with the debugger/simulator/breakpoints but will show actual assembly code generated along with the c code. |
|
|
|
杰克在这里走对了。所有的构建工具都具有生成列表文件的能力。您只需要确保设置了正确的选项。创建了反汇编视图,以便无论使用什么构建工具,都会有一个一致的“列表”视图。这使得在编辑器窗口中正确显示PC、断点等标记更加容易。
以上来自于百度翻译 以下为原文 Jack is on the right track here. All the build tools have the ability to generate a list file. You just have to make sure the right options are set. The disassembly view was created so that there would be a consistent "listing" view no matter what build tool was used. This makes it much easier to get PC, breakpoint, etc. markers displayed correctly in the editor window. |
|
|
|
作为指导,当使用大型闪存时,“Windows->Debug.->Output->.mblyListing”为MPlabX创建了一个太大的文件(>1mB)。当它问是否要打开它。响应“否”(破坏IDE),打开用“Word Pad”生成的“清单.ISASM”文件作为备选方案。这可以在项目“拆卸”文件夹中找到。Yorky
以上来自于百度翻译 以下为原文 As guidance, when using large flash memory parts, the "Windows->Debugging->Output->Disassembly Listing" creates a file too large for MPlabX (>1mB). When it asks whether to open it anyway. Respond No (does corrupt the IDE) and open the "listing.disasm" file that is generated with WordPad as an alternative. This can be found in the project "disassembly" folder. T Yorky |
|
|
|
是否可以同时看到不同函数(主函数调用)的反汇编。我只能看到他们,当他们被调用,否则我看到只有拆卸主。在清单文件中是可能的,但在拆卸中是否可能?
以上来自于百度翻译 以下为原文 Is it possible to see disassembly of different functions (which are called in main function) at once. I can only see them when they are called, otherwise I see only disassembly of main. It is possible in listing file, but is it possible in disassembly? |
|
|
|
|
|
|
|
感谢QHB的回复。是的,我已经看过了,但是我的问题是不同的。在列表文件中,调试器不工作。我的问题是,有没有办法看到在主函数中调用的C文件的不同部分以及同时工作的调试器。可能只有当我们查看程序内存时,或者如果有其他方法,才有可能看到?
以上来自于百度翻译 以下为原文 Thanks qhb for reply. Yes I have read that but my question is different. In a listing file debugger is not working. My question is that is there any way to see different parts of a C file which are called in main function along with debugger working at the same time. Probably it is only possible while we are viewing program memory or if there is some other way? |
|
|
|
只有小组成员才能发言,加入小组>>
5231 浏览 9 评论
2026 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3200 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
770浏览 1评论
658浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
587浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
668浏览 0评论
570浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-18 23:06 , Processed in 1.785635 second(s), Total 98, Slave 82 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号