Microchip
直播中

赵静

7年用户 174经验值
私信 关注
[问答]

请问在MPLAX中有什么特别的东西要生产吗?

如果是的话,在MPLAX中有什么特别的东西要生产吗?我看到.HEX文件和.O文件,但不是.s,或.ASM。

以上来自于百度翻译


      以下为原文

    And if so, is there anything special one has to do in MPLAB X to produce them? I see .hex files and .o files, but not .s, or .asm.

回帖(6)

郑雅颖

2019-6-17 10:04:23
我从未对查看原始的.S文件感兴趣,但我经常使用XC16提供的实用工具xc16-objdump来获取.lst文件,该文件显示与生成的汇编语言交错的C源。单击您正在处理的配置下的构建。单击标记为“在构建之后执行此行”的复选框,将下列内容粘贴到该复选框(所有一行)${MP_CC_DIR}/xc16-objdump-S${ImageDir}/${PROJECTNAME}.${IMAGE_TYPE}.elf>${ImageDir}/${PROJECTNA中lst文件将出现在与.hex文件相同的目录中。它适用于MPLABX版本3.45和XC16版本1.26,但是我已经将它与许多以前的IDE版本和编译器一起使用。

以上来自于百度翻译


      以下为原文

    I have never been interested in seeing raw .S files, but I frequently use the utility xc16-objdump, which is supplied with XC16, to get a .lst file that shows C source interleaved with generated assembly language.
 
Here's the way I do it:

  • Right-click the project's icon in the Project pane and select Properties
  • Click Building under the configuration you are dealing with.
  • Click the checkbox labelled Execute this line after build
  • Paste the following into the line below that checked box (all one line)
    ${MP_CC_DIR}/xc16-objdump -S ${ImageDir}/${PROJECTNAME}.${IMAGE_TYPE}.elf > ${ImageDir}/${PROJECTNAME}.${IMAGE_TYPE}.lst
  • The .lst file will appear in the same directory as the .hex file.
It works for me with MPLABX version 3.45 and XC16 version 1.26, but I have used it with lots of previous versions of IDE and compiler.
 
Regards,
 
Dave
举报

李天竹

2019-6-17 10:13:02
常规的GCC有一个命令行开关“保存临时模块”,它节省了预处理器输出和汇编程序。我不知道你能否用XC16来做。

以上来自于百度翻译


      以下为原文

    The regular GCC has a command line switch "-save-temps" which saves pre-processor output and assembler. I don't know if you can do it with XC16.
举报

李蕊

2019-6-17 10:27:50
XC16GCC测试.c-保存温度

以上来自于百度翻译


      以下为原文

   


xc16-gcc test.c -save-temps
 
 
举报

杨叶

2019-6-17 10:43:21
谢谢,这很有帮助。第一行中的路径中的斜线需要朝相反的方向,但是一旦我修复了它,它就生成了.lst文件,这实际上是我在寻找的。

以上来自于百度翻译


      以下为原文

    Thanks, this was helpful. The slash in the path in the first line needed to be in the opposite direction, but once I fixed that, it generated the .lst file, which is actually what I was looking for. 
举报

更多回帖

发帖
×
20
完善资料,
赚取积分