完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有一些程序,我使用MPLAB 8.4来开发。我已经移动到MPLABX并成功开发了新程序。我已经从MPLABX启动窗口导入了一些旧的程序,并在MPLABX正确编译。我没有对源代码做任何修改,但是编译的代码在任何一种情况下都不适用于目标硬件!程序挂起,我找不到哪里,所以任何建议,看看哪里将是最受欢迎的。
以上来自于百度翻译 以下为原文 I have a number of programs which I used MPLAB 8.4 to develop. I have moved to MPLABX and developed new programs successfully. I have imported a couple of old programs using the Import Legacy projects from the MPLABX Start window, and they compile correctly in MPLABX. I have made no changes whatsoever to the sources, but the compiled code does not work in the target hardware in either case! The programs hang and I can't find where, so any suggestions as to where to look would be most welcome. |
|
相关推荐
10个回答
|
|
你可以提到一些重要的细节,比如你在用什么语言(汇编程序)?C?)和你一起工作的照片是什么样的?我猜你是在绝对模式的汇编程序中工作,并且被汇编程序默认的链接模式绊倒了,但是你甚至没有提到“不工作”对你意味着什么。
以上来自于百度翻译 以下为原文 You could mention a few vital details, like what language you are working in (Assembler? C?), and what family of PICs you are working with? My guess is you are working in assembler in absolute mode, and have been tripped up by the assembler defaulting to linking mode, but you didn't even mention what "doesn't work" means to you. |
|
|
|
您甚至没有提到使用的PIC或编译器或编译器版本。或者你是否改变了它。要有点冗长,没有什么理由不起作用。为什么你不知道什么是工作,什么是不工作?你能进入你的主要功能吗?
以上来自于百度翻译 以下为原文 You did not even mention which PIC or compiler or compiler version you use. Or whether you changed it. Be a bit more verbose. There is no general reason why it should not work. Why can't you tell what is working and what is not working ? Can you step into your main function or not ? |
|
|
|
你提供的信息越多,就越能找出什么是错的。
以上来自于百度翻译 以下为原文 The more info you supply, the more clues to figure out what could be wrong. |
|
|
|
在MPLAB中,配置位可以在IDE中设置。在MPLABX,你必须把它们设置成代码。(可以在GUI中设置它们,但必须从代码中生成代码以添加到源代码中),如果配置比特不同,那么这可以解释为什么它不工作。
以上来自于百度翻译 以下为原文 In MPLAB the configuration bits can be set in the IDE. In MPLABX, you have to set them in code. (you can set them in GUI, but you have to generate code from it to add them to your source code) If the config bits are different, then this could explain why it does not work. picy2620 |
|
|
|
好的,这里是:PIC是16F1825。程序是用C编写的,在XC8 V1.42中使用Microchip PRO编译器编译。MPLABX是版本3.65。遗留程序是这样配置的:ING MPLABX或编译器不抱怨!程序进入主程序(),但我不知道它会去哪里。
以上来自于百度翻译 以下为原文 Ok, here goes: The PIC is the 16F1825. The programs are written in C, and compiled using the Microchip Pro complier in XC8 v1.42. MPLABX is version 3.65. The legacy programs were configured thus: __CONFIG(CLKOUTEN_OFF & PWRTE_ON & WDTE_OFF & FOSC_HS & MCLRE_OFF & CP_OFF & BOREN_ON & IESO_OFF &CPD_OFF); __CONFIG(PLLEN_OFF & WRT_OFF & LVP_OFF); If the #pragma format is necessary, it's surprising MPLABX or the compiler doesn't complain! The program enters main() but I don't know where it goes then. |
|
|
|
|
|
|
|
嗨,你在MPLAB V8中优化了原来的应用程序,而不是在MPLAB X中进行优化(反之亦然)?如果你在MPLAB V8项目中优化,现在你没有在MPLAB X中设置优化,这肯定是一个潜在的问题…MPLAB X也接受旧的语法,这就是为什么它不抱怨;=)你必须编译和调试你的代码,所以当你停止SW你知道在哪里搜索。简单地改变编译器版本或优化可能会使程序改变行为(定时或其他)。与你想象的新编译器有一个bug不同,它通常意味着软件做出了一些不正确的假设,现在这就是为什么SW不运行(在大多数情况下,用户责怪编译器;=)NB:可能是你改变了编译器版本吗?当做
以上来自于百度翻译 以下为原文 Hi, Did you optimize original application in MPLAB v8 and not optimize in MPLAB X (or vice-versa) ? If you optimized in MPLAB v8 project and now you did not setup optimization in MPLAB X, this is surely a potential issue... MPLAB X accept also the old syntax, that is why it does not complain ;=) You must compile and debug your code so when you stop the SW you know where to search. You should always have in mind that simply changing compiler version or optimization can potentially make a program changing behaviour (timing or something else). Unlike what you may suppose that the new compiler has a bug, it generally means that the software made some assumptions which were not correct and now that is why ithe SW does not run (in most cases users blame inapropriately the compiler ;=) NB : could it be that you changed the compiler version ? Regards |
|
|
|
引用:“为什么不试着用调试器找到它呢?”首先,因为它是一个实时系统,当它不正常运行时很难判断发生了什么,其次,因为MPLABX似乎没有在MPLAB 8中工作得很好的模拟和单步执行设备。MPLABX似乎假设我有一个插入的调试工具,而我没有!(我使用PM3进行编程,但他们不希望我使用它来运行设备,当它插入到PM3中时?)它必须在目标硬件中。因此,MPLABX告诉我没有调试资源。
以上来自于百度翻译 以下为原文 Quote: "Why don't you try to find it out using a debugger?" Firstly, because it's a real-time system and it's hard to tell what's going on when it isn't running properly. And, secondly, because MPLABX doesn't seem to have the simulation and single-stepping facilities which worked so well in MPLAB 8. MPLABX seems to assume that I have a debug tool plugged in and I don't! (I use a PM3 for programming , but surely they don't want me to use that to run the device when it's plugged into the PM3? It has to be in the target hardware.) Accordingly, I am told by MPLABX that there are no Debug Resources. |
|
|
|
模拟器存在于MPLAB X!在MPLAB 8中,工具与项目分离。在MPLAB X中,该工具是Project属性(或者更准确地说是配置属性)。因此,在MPLAB X中,转到Project属性并选择模拟器作为您的工具。
以上来自于百度翻译 以下为原文 Simulator is present in MPLAB X! In MPLAB 8, the tool was separate from the project. In MPLAB X, the tool is a project property (or more accurately a configuration property). So in MPLAB X, go to project properties and select simulator as your tool. |
|
|
|
http://MyCHIPPrdult.COM/MPLABX:Simulasimo一个便宜的调试器,如PICTIT3会节省很多时间。
以上来自于百度翻译 以下为原文 http://microchipdeveloper.com/mplabx:simulator IMO a cheap debugger like PICkit3 would save a lot of your time... |
|
|
|
只有小组成员才能发言,加入小组>>
5188 浏览 9 评论
2009 浏览 8 评论
1933 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3181 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2232 浏览 5 评论
743浏览 1评论
629浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
512浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
642浏览 0评论
538浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 12:20 , Processed in 1.620075 second(s), Total 96, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号