完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
您好,我是在旧的IDE 8系列IDE中用C编译器2.02编写的移植代码。切换到MPLABX并使用XC 1.40编译器。第一处理器模块被移动到新的环境,处理器从P32 MX795F512L变为P32 MZ2048 EFH100以进行图形显示。RAM的增加允许使用16位颜色而不是8位颜色。我尝试使用导入函数,但结构复杂。手册创建了项目,MZ工作得很好。在ASM中使用的原始代码用于等待状态、缓存和其他功能。使用CP0DEFS.H中的标准C和宏来处理核心定时器、中断表和一般异常处理程序。只需要包含p32 MZ2048 EFH100.h文件,就不需要特殊的链接器脚本。现在我进入另一个模块的转换,并尝试将MZ编写的一般异常处理程序移植到MX。坚持使用CPODEF.H宏.ycCP0GEtiOGEASE()函数作为定义的IPC0DF。正确编译但不会链接。获取错误:C:/UnVIGID/Actudio.x/DePasyToCurror。C:578:未定义的引用“`MFC0'”,我查看了默认的.LD文件,它有:可选的(“LBMCHPpEurth.a”)OP我尝试将.LD文件移到我的目录和项目中,但是错误仍然和数百个其他的一样。所以第一个问题是如何使用默认的开发环境来解决这个错误。第二个问题是如何正确使用自定义链接文件并消除错误。我需要做两个,因为我的BooToad方法是在内存的下半部有一个“工厂”代码,防止被重写,一个启动函数,在上面的内存区域中查找代码,如果有效的COD。找到e执行它。如果不是,则擦除代码并运行“工厂”图像。我用一个固定的定位函数建立了一个过程的原型,该函数模拟了几个LED闪烁的高代码,当一个开关被按下时,改写一个字破坏校验和然后导致重启。在重新启动时,校验和验证失败,擦除损坏的上层代码,并允许“工厂:代码运行”。这个地方可以发布这个问题吗?有什么解决办法吗?谁能给我举个例子?约瑟夫扬克斯
以上来自于百度翻译 以下为原文 Hello, I am porting code written in c compiler 2.02 in the older IDE 8 series ide. Switching to MplabX and using the xc 1.40 complier. First processor module was moved to the new environment with a processor change from p32mx795f512l to p32mz2048efh100 for a graphic display. Ram increase allowed for use of 16 bit color instead of 8 bit color. I tried using the import function but the structure was to complex. manual created the project and the MZ is working great. Original code used in line ASM for wait states, cache, and other functions. Used standard C and macros from cp0defs.h to handle working on core timer, interrupt tables and general exception handlers. No special linker script was required just including the p32mz2048efh100.h file. I am now into the conversion of another module and attempted to port the general exception handler I wrote for the MZ to the MX. Stuck on the use of the cpodef.h macros. _CP0_GET_CAUSE() function as defined in cp0defs.h compiles correctly but will not link. getting error: c:/univdig/converter.x/display_converter.c:578: undefined reference to `_mfc0' I looked at the default .ld file and it has the: OPTIONAL("libmchp_peripheral.a") OPTIONAL("libmchp_peripheral_32MX795F512L.a") I tried moving the .ld file to my directory and the project but the error remained along with hundreds of others. So the first question is how do I get the error to be solved using the default development environment. The second question is how do I correctly use a custom link file and eliminate the errors. I need to do both as my bootload method is to have a "FACTORY" code in the lower half of memory, protected from being overwritten, a start function that looks for code in the upper memory area and if valid code is found executes it. if not the code is erased and the "factory" image is run. I built a prototype of the process with a fixed located function simulating the high code which blinks a few leds and when a switch is depressed, overwrites one word destroying the checksum then causing a restart. During the restart the checksum verification fails which erases the damaged upper code and allows the "factory: code to run". Is this the right place to post this question? Any solutions? Can anyone point me to an example? thanks Bill Yonkers |
|
相关推荐
3个回答
|
|
|
|
|
|
|
|
|
谢谢,我试过包括XC.H,但它已经产生了很多错误,我认为这不是答案。应该知道的更好。
以上来自于百度翻译 以下为原文 thanks, I tried including xc.h earlier but it had generated tonnes of errors, I assumed it was not the answer. Should have known better. |
|
|
|
|
|
你的旧项目很可能使用PLIB。而不是使用V1.40,它可能更容易使用V1.34,这是最后一个版本的船用PLIB。在V1.34之后,PLIB需要一个单独的安装包或使用和声。转到编译器安装目录的DOC文件夹,查看Read文件。
以上来自于百度翻译 以下为原文 It is likely your old project uses PLIB. Instead of using v1.40, it might be easier to use v1.34, which is the last version that ships with PLIB. Anything after v1.34, the PLIB requires a separate install package or using Harmony. Go to the doc folder of the compiler install directory and take a look the readme.html file. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1123浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 01:12 , Processed in 0.927073 second(s), Total 79, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1116