完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我需要你们的帮助:/我有许多设备拥有相同的引导加载程序和应用程序,它们都是由MyPrimor开发并用HTC编译的。两个都是多年来开发的,所以代码不太好。我用MPLAB X和XC8编译器开发了一个新的应用程序FFW,因为我认为HTC的引导加载程序和XC8的应用程序不会有问题。如果我包含了Bootloader的HEX文件,请给出我的应用程序。在一个代码偏移,编译与XC8和程序(与拾取2)的PIC18F45 85一切都很好。我可以通过bootloader毫无问题地闪烁新的应用程序fw。但是如果我编程“旧的”十六进制文件(使用HTC编译的应用程序的引导加载程序)并试图通过bootloader升级应用程序(使用XC8编译的新应用程序),控制器永远不会进入应用程序部分:/。如果使用XC8编译旧应用程序,但不使用HTC编译,则会发生。使用HTC->旧应用程序编译的Bootlaoder-hex文件可以通过引导加载程序升级,新的不是。使用XC8->旧应用程序编译的Bootlaoder-hex文件既不是旧固件也不是新固件。可以通过bootloader升级。用XC8->新应用程序编译的Bootloader-hex-file可以升级,旧的应用程序。我不知道如何修复这个错误或者我做错了什么,你呢?最好的问候Goku
以上来自于百度翻译 以下为原文 Hello guys, i need your help :/ I have many devices with the same bootloader and an application, both developed by my predecessor and compiled with HTC. Both were developed over many years and so the code isn't well looking. I developed a new application fw with MPLAB X and the XC8 compiler, because I thought that there would be no problem with an bootloader from HTC and an application from XC8. If I include the bootloader hex file, give my application a codeoffset, compile that with XC8 and program (with a PICkit 2) the PIC18F4585 everything works fine. I can flash a new application fw without any problem via bootloader. But if I program the 'old' hex file (bootloader with application compiled with HTC) and try to upgrade the application (new one compiled with XC8) via bootloader, the controller never enters the application part :/. The same problem occures if I compile the old application with XC8, but not if I compile it with HTC. Bootlaoder-hex-file compiled with old application with HTC -> old firmware can be upgraded via bootloader, new one not. Bootlaoder-hex-file compiled with old application with XC8 -> neither old or new firmware can be upgraded via bootloader. Bootloader-hex-file compiled with new application with XC8 -> new application can be upgraded, old application not. I have no clue how I can fix that or what I'm doing wrong, do you? Best regards Goku |
|
相关推荐
4个回答
|
|
我想知道您是否可以重建原始引导加载程序和应用程序并使其全部工作?
以上来自于百度翻译 以下为原文 I wonder if you can rebuild the original bootloader and application and make it all work ? |
|
|
|
如何处理高、低中断向量位置?
以上来自于百度翻译 以下为原文 How do you handle the high and low interrupt vector locations? |
|
|
|
是的,我可以用旧编译器使用旧项目,但我更喜欢用xc8编译的新应用程序项目。但是,如果没有可能的话,我必须优化和补充旧的代码(这是经过多年开发的,您可以看到:/)。应用程序具有正常中断HighApplicationIsr(void)/void中断low_.LowApplicationIsr(void)函数,该函数实现了d引导加载程序有一个GOTO到0x2008/0x2018(应用程序有一个0x2000的偏移量)的a t void中断HighBootloaderIsr(void)/void中断low_.LowBootloaderIsr(void)。不是好方法,而是一种行之有效的方法,那就是我不明白为什么!两个编译器使用不同的方式组合C的指令集,以实现相同的功能性。如果我把两个项目和不同的编译器结合起来,为什么会有这么大的问题呢?
以上来自于百度翻译 以下为原文 Yes, I'm able to use the old projects with the old compiler, but i would prefer to use my new application project compiled with xc8. But if there is no possibility to make it work, I have to optimize and complement the old code (which was developed over years and you can see that :/). The application has the normal void interrupt HighApplicationIsr(void) / void interrupt low_priority LowApplicationIsr(void) functions implemented and the bootloader has a GOTO to 0x2008 / 0x2018 (the application has an offset of 0x2000) at void interrupt HighBootloaderIsr(void) / void interrupt low_priority LowBootloaderIsr(void). The biggest problem isn't that nothing is working, I can use the workaround with the old application firmware (thats not the nice way, but a way that works) , it's that I don't understand why!? The two compiler use different ways of combining the instruction set of the µC to achieve the same funcitonality. Why is it such a big problem if I combine two projects with different compilers? |
|
|
|
据我所知:似乎你可以用Mplab X和XC8构建一个引导加载程序和应用程序,所有的工作都可以用XC8引导加载程序[编辑]得很好。它不能用HTC引导加载程序。--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------应用(使用HTC)将HTC引导加载程序更改为XC8引导加载程序,以便我可以继续。这个序列不是简单的,而是可能的,在我的例子中,它要求XC8引导加载程序不使用应用程序共享的内存。
以上来自于百度翻译 以下为原文 As I understand the situation: It seems you can build a bootloader and application with Mplab X and XC8 and all works It does not work with the HTC bootloader. ---------------- Providing the config registers do not have to change I found I could build an application ( with HTC ) that changed the HTC bootloader to the XC8 bootloader so I could continue. This sequence was not straightforward but possible, in my case it required the XC8 bootloader to use no memory shared by the application. |
|
|
|
只有小组成员才能发言,加入小组>>
5142 浏览 9 评论
1990 浏览 8 评论
1918 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3159 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2215 浏览 5 评论
710浏览 1评论
598浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
481浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
610浏览 0评论
508浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-10 15:47 , Processed in 0.998715 second(s), Total 51, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号