完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我使用PIC18F46K22MPLAB X IDE V4.05XC8 V 1.44 MCC V 3.36Bootloader V2.2.0统一主机V0.1.8i一步一步地遵循引导加载向导(DS400 01779B),并用引导加载程序编程该芯片。统一的主机状态引导加载成功,如果我读取程序内存,我可以看到代码存在。但是,代码不执行。我在BootloadErrPixListin()中放置了一个断点,运行Bootloader,并通过代码监视程序内存;它在程序内存中显示了Goto 0x800,但是当我进入代码行时,它指向X19A8(这是未被我的加载代码使用的)。更改重置向量并注意到两个问题。1)除非将其设置为小于引导加载程序的末尾,否则代码永远不会重置到重置向量,这当然会覆盖引导加载程序。(2)因为X800,即使在IGANGE工具链接器内存模型 ROM范围和引导加载程序代码和主机引导装载器偏移地址中的重置向量,代码总是在X800编程。我不确定这是否是连接或一个不同的问题。我已经附加了引导加载程序。我正在寻找一些帮助来理解这个问题。谢谢。
以上来自于百度翻译 以下为原文 I am using the PIC18F46K22 MPLAB X IDE v4.05 XC8 v 1.44 MCC v 3.36 Bootloader V 2.2.0 Unified Host v 0.1.8 I have followed the bootloader guide (DS40001779B) step by step, and programed the chip with the boot loader. The unified host states bootloading successful, and if I read the program memory I can see the code present. However, the code does not execute. I placed a breakpoint at the STKPTR = 0x00 in BOOTLOADER_Initialize (), run the bootloader, and step through the code watching program memory; it shows GOTO 0x800 in the program memory, but when I step into that line of code it vectors to x19A8 (which is unused by my down loaded code). I also tried changing the reset vectors and noticed two issues. 1) The code never goes to the reset vector unless I set it to less than the end of the bootloader, which of course will overwrite the boot loader. (I only checked that because of curiosity). 2) The code is always programed at x800 even if I change the ToolsLinkermemory modelrom range and the reset vectors in the Bootloader code and Host bootloader offset address. I am not sure if this is connected or a different issue. I have attached the boot loader project. I am looking for some help to understanding this problem. thanks Attachment(s) MCC_BL_2018.X.zip (218.09 KB) - downloaded 21 times |
|
相关推荐
9个回答
|
|
Bootloader插件V2.2.31现在可以在www. MICCHCOMP.COM/MCC中使用,点击“当前下载”选项卡。这个版本修复了一些你还没有遇到的问题。还有,你设置了项目配置吗?新用户指南(DS400 01779B)第5章通过步骤来设置三个配置。
以上来自于百度翻译 以下为原文 Bootloader plug in V2.2.31 is now available at www.microchip.com/mcc, click on the "current download" tab. That version fixes a bunch of problems you haven't run into yet. Also, have you set up the projects configurations? The new User's Guide (DS40001779B) Chapter 5 walks through the steps to set up the three configurations. |
|
|
|
我将更新引导加载程序插件V2.2.31和重新测试。我没有设置配置,因为我将MCC的引导加载程序配置位复制到测试项目中。我读了第5章,觉得我的方法不错。但是,在更新引导程序之后,我将遵循第五章的步骤。
以上来自于百度翻译 以下为原文 I will update the Boot loader plug to V2.2.31 and retest. I did not set up the configurations, because I copied the MCC's Boot loader config bits to the test project. I did read chapter 5 and thought my approach was ok. However, I will follow chapter fives steps after I update the bootloader. Thanks |
|
|
|
我已经更新如下:MPLAB X IDE V4.05XC8 V 1.45 MCC V 3.45.1 Bootloader V2.2.31统一主机V 0.1.8,所以现在我有三个问题:1)引导加载程序在引导加载后仍然没有矢量到复位矢量。2)即使工具Link 内存模型ROM范围和复位矢量在Bootloader代码和主机Bootloader偏移地址到0x500,代码总是在X800编程。Bootloader只使用X432.3)编译器总是显示断点作为断点,但幸运的是将打破。
以上来自于百度翻译 以下为原文 I have updated as follows: MPLAB X IDE v4.05 XC8 v 1.45 MCC v 3.45.1 Bootloader V 2.2.31 Unified Host v 0.1.8 So now I have three issues 1) The bootloader still does not vector to the reset vector after bootloading. 2) Even though I change the ToolsLinkermemory modelrom range and the reset vectors in the Bootloader code and Host bootloader offset address to 0x500, the code is always programed at x800. The bootloader only uses x432. 3)The compiler always shows breakpoints as broken, but fortunately will break. |
|
|
|
你能用你的条目发布主机应用程序的图片吗?也可以发布被加载的十六进制文件。
以上来自于百度翻译 以下为原文 Can you post a pic of the host application with your entries? Also can you post the hex file being bootloaded. |
|
|
|
是的,我也会给出一些详细的回应,因为其他人可能会读到这一点。我一直在研究这个问题,这似乎是计算机、IDE或XC8与MCC或ME生成的代码的问题。上面提到的原始问题是在一个6M RAM的CORIE5上。一旦我升级了XC8(实际上是1.44),Bootloader,ECT。我无法让编译器工作,基本上它冻结了我的电脑。我注意到CPU运行在接近100%。如果它跑了,我也会遇到同样的问题。所以我得到了一台新电脑,上传了最新版本的所有东西,并把我的驾照转换了一遍。我从头开始创建了一个新项目(使用用户指南(DS400 01779B))。最初,我无法编译它,结果是工具编译器优化默认值与PRO和运行过的分配引导程序内存空间无关。最后我把它编译了,但不是运行。我用“WiMeCon”将新计算机的项目与旧计算机上的项目进行比较,只看到注释代码的差异-修订主要是XC8 1.44与1.45。我还比较了链接器、编译器和其他工具选项。总结旧计算机上的项目将编译和运行,但到错误的重置向量,新的计算机上的项目将编译,但不运行,即使没有明显的差异。然后我在新计算机上把编译器反编译为1.44,但仍然不起作用。最后,我把项目文件夹从旧计算机复制到新的计算机上,看起来好像很有效。如果我编程的芯片,我想我可能是好的,但如果我试图模仿代码断点显示为破碎,但仍然有效。目标卡重置按钮被忽略,以及其他问题。因此,我仍然不确定为什么如果我使用MCC创建一个新的项目,它将不起作用,为什么我有这么多的故障变体。然而,我比较确信它是编译器或开发软件中的更高级别的东西。我仍然在研究新项目,以便能够理解根本原因。
以上来自于百度翻译 以下为原文 Yes, I will also give a somewhat detailed response for the sake of others that may read this. I have been working on this and it seems to be an issue with the computer, IDE or XC8 versus the code generated by MCC or me. The original problem stated above was on a corei5 with 6M ram. Once I upgraded the XC8 (actually this was 1.44), bootloader, ect. I could not get the compiler to work, basically it froze my computer. I noticed the CPU running at nearly 100%. If it did run then I got the same problem. So I got a new computer, uploaded the newest release of everything and converted my license over. I created a new project from scratch (using the User's Guide (DS40001779B)). Initially I could not get it to compile, which turned out to be the toolscompilerOptimization defaulting to free versus pro and over running the allocated bootloader memory space. Then finally I got it to compile, but not to run. I compared the project on new computer with the project on old computer using "Winmerge" and could only see differences in commented code - revision mostly XC8 1.44 versus 1.45. I also compared the linker, compiler and other tool options. To summarize the project on the old computer would compile and run but go to the wrong reset vector, and the project on the new computer would compile but not run even though there is no discernible difference. Then I retrograded the compiler to 1.44 on the new computer and it still did not work. Finally, I copied the project folder from the old computer to the new computer and it seems to work, kind of. If I program the chip I think I might be good to go, but if I try to emulate the code breakpoints are shown as broken, but still works. The target card reset button is ignored, and other issues. So this still has me unsure why if I create a new project using the MCC that it won't work and why I have so many variants of failure. However, I am relatively sure it is something higher level in the compiler or development software. I am still working the new project so that I can have an understanding of the root cause. Attached Image(s) Attachment(s) Hex files.zip (6.74 KB) - downloaded 15 times |
|
|
|
我打得太早了。我的文章的其余部分:在统一的主机上,我使用0x1000、0x4000和0x8000来进行程序内存大小。三个zip文件使用小于0x1000内存,并且我发现内存大小对擦除周期所花的时间有很大的影响。我在三之间循环测试Bootloader。在RB0&AMBR1上输入一个闪光灯LED,输入3个灯LED向上,RB0 RB3。IMPUL4在初始化时永久开启LED,MyCHIPS复位(我的自定义复位功能),主要功能,和ISR。
以上来自于百度翻译 以下为原文 I hit send too early. The rest of my post: On the unified host I use 0x1000, 0x4000, and 0x8000 for program memory size. The three zip files use less than 0x1000 memory and I found that the memory size has a significant impact on the time spent in the erase cycle. I cycle between the three to test the bootloader. Import one flashes LEDs on RB0 & RB1, Import3 lights LEDs up the down, RB0-RB3. Import4 permanently turns on an LED in Initialization, Mychip Reset (my custom reset function), the main function, and ISR. |
|
|
|
我的目标卡是PICDEM2,我想我可以附上项目文件夹。工作,但错误的复位向量,直到复制到新的计算机,然后它工作除DEGRADE DMAPLAB X IDE V4.05WI10COREI5 6M RAMXC8 V 1.44 MCC V 3.45.1 BooLoad V2.2.31统一主机V 0.1.8McCuBoLoad Ser2012018是在新的计算机MPLAB X IDE V4.05Win 10CAREI7 16M RAMXC8 V 1.4的项目5MCC V 3.45.1 BooLoad V2.2.31统一主机V0.1.8编译,但不会运行IE不会引导加载。
McCuBooTouleL201.X.Zip(215.13 KB)-下载13次 以上来自于百度翻译 以下为原文 My target card has been a PICDEM2 and I thought I could attaché the project folders. __MCC_BL is the project on the old computer. Works, but wrong reset vector, until copied to new computer, then it works except emulation is degraded MPLAB X IDE v4.05 WIN10 Corei5 6M RAM XC8 v 1.44 MCC v 3.45.1 Bootloader V 2.2.31 Unified Host v 0.1.8 _MCC_BootLoader_2018 is the project on the new computer MPLAB X IDE v4.05 WIN10 Corei7 16M RAM XC8 v 1.45 MCC v 3.45.1 Bootloader V 2.2.31 Unified Host v 0.1.8 Compiles, but won't run ie won't bootload. Attachment(s) __MCC_BL.X.zip (209.93 KB) - downloaded 16 times _MCC_BootLoader_2018.X.zip (215.13 KB) - downloaded 13 times |
|
|
|
|
|
|
|
丹诺,谢谢你的反馈。我能够启动负载,所以是的,问题解决了。我仍在尝试理解工具集的所有状态,即XC8编译器,我不相信它是正确的,但是这超出了我原来的文章的范围。再次感谢。
以上来自于百度翻译 以下为原文 Danno, Thanks for your feedback. I am able to boot load, so yes the problem is solved. I am still trying to understand all the nuances of the toolset i.e. XC8 complier, which I do not believe is working correctly, but that is outside the scope of my original post.. Thanks again. |
|
|
|
只有小组成员才能发言,加入小组>>
5003 浏览 9 评论
1921 浏览 8 评论
1850 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3066 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2143 浏览 5 评论
571浏览 1评论
427浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
473浏览 0评论
366浏览 0评论
IPECMD命令烧录AVR128DA48芯片,报找不到芯片错误
851浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-8-15 10:24 , Processed in 1.433078 second(s), Total 89, Slave 72 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191