完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
大家好,我有一个使用MPLAB v8.91和C30 v3.30b编译器构建的遗留应用程序。该软件需要一些更改,但我想在MPLLABX中进行开发,但仍然使用C30编译器。在进行任何更改之前,我用两个IDE构建应用程序,希望生成的文件是相同的。但是,它们不是。所有的.o文件都是不同的,因此cof、hex和map也是不同的。我还没有发现如何查看程序集以查看它们之间的区别,但是对于一个文件,差异大约是.o文件的1%(根据hex diff工具)。我不明白为什么这些差异会悄然出现。你知道吗?谢谢,克雷格
以上来自于百度翻译 以下为原文 Hi all, I have a legacy application built with MPLAB v8.91 and C30 v3.30b compiler. The software needs some changes but I'd like to do the development in MPLAB X but still with C30 compiler. Before making any changes I built the application with both IDE expecting that the generated files are identical, however, they aren't. All the .o files are different and consequently so are the cof, hex and map. I've not yet found out how to view the assembly to see what the differences are, but for one file the differences are about 1% of the .o file (according to hex diff tool). Examining the command-line arguments to pic30-gcc I can't see any reason why these differences should creep in. Do you you have any idea? Thanks, Craig |
|
相关推荐
7个回答
|
|
|
为什么?除非你添加了一整类新的特性,比如USB或以太网,否则我认为你只是在为自己做更多的工作。我在MPLAB X中有一些项目,但是对于遗留项目,我仍然使用MPLAB v8.92没有任何问题。
以上来自于百度翻译 以下为原文 Why? Unless you are adding a whole new class of features like USB or Ethernet, I think you are just making a lot more work for yourself. I have some projects in MPLAB X but for legacy projects, I still use MPLAB v8.92 with no problems. -Bill |
|
|
|
|
|
问题的第一部分现在已经解决了:为什么O文件不同?这被证明是由MPLAB-X编译在与MPLAB 8不同的目录中造成的,o文件正在存储一些相对路径。通过在windows cmd提示符中手动运行命令,我成功地生成了相同的.o,这足以证明上面的内容。
以上来自于百度翻译 以下为原文 The first part of the problem is now solved: Why are the .o files different? This turned out to be caused by MPLAB-X compiling in a different directory from MPLAB 8, the .o file is storing some relative paths. I managed to generate identical .o by manually running commands in the windows cmd prompt, which is sufficient to prove the above. Now I can move on to investigate the cof, map and hex |
|
|
|
|
|
这两个IDE中的cof和map文件可以匹配,我的差异是由link命令中的.o文件的顺序造成的。此外,相对路径在人类可读部分中造成了一些差异,但是这些差异很容易解决。拥有bin数据对于理解我的十六进制文件几乎是相同的(尽管看起来完全相反)是至关重要的。
以上来自于百度翻译 以下为原文 The cof and map files from both IDE can be made to match, my differences were caused by the order of .o files in the link command. Also the relative paths caused some differences in the human readable sections but these were easily resolved. Thanks for this hint. Having the bin data was critical for understanding that my hex files are almost identical despite looking quite the opposite. I said almost so I'm not done yet but the end is in sight. |
|
|
|
|
|
也检查命令行选项。和优化水平。它是C30的一个副本,它们都需要注册。
以上来自于百度翻译 以下为原文 Also check the command line options. And the Optimization level. It one copy of C30 is registerd they both need to be. |
|
|
|
|
|
谢谢你的暗示。对于理解我的十六进制文件几乎是一样的,尽管看起来完全相反,但是拥有bin数据是至关重要的。我说过大部分我还没有完成,但是结束就在眼前。没问题。十六进制文件的外观取决于十六进制生成器的实现——出于这个原因,我一直比较二进制文件
以上来自于百度翻译 以下为原文 Thanks for this hint. Having the bin data was critical for understanding that my hex files are almost identical despite looking quite the opposite. I said almost so I'm not done yet but the end is in sight. no problem. how the hex files look depends on the implementation of the hex generator - I've always compared binaries for that reason |
|
|
|
|
|
我总是对设备进行编程、回读、导出十六进制文件,如果完全不确定,还要比较实际放入设备中的内容。
以上来自于百度翻译 以下为原文 I always program devices, read back, export hex files, and compare what was actually put in the devices if I am at all uncertain. |
|
|
|
|
|
谢谢您提供的所有提示。现在我确信C30编译器正在用IDE生成相同的代码。
以上来自于百度翻译 以下为原文 Thanks for all the tips. I'm now confident that the C30 compiler is producing the same code with either IDE. Craig |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
501 浏览 0 评论
5808 浏览 9 评论
2350 浏览 8 评论
2237 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3543 浏览 3 评论
1155浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1119浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
887浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
501浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-12 07:06 , Processed in 0.763860 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
186