完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,我正在做一个引导加载程序,但我受到硬件的限制。我使用的是由微船提供的EZBL项目作为指导。我不能访问CTS和RTS,所以我已经改写了使用U1TXRG和U1RXRG的代码。使用SaleAE逻辑分析仪,我看到我所有的数据都被正确地来回传送。我有一个Java应用程序给我发送一个字节,然后PIC发送相同的字节作为ACK。这一切都有效。CRC是错误的,因为我还没有修复这一点。我得到的错误是:“错误:通信错误:远程节点中止错误- 9周围的BLB偏移10707(10707)读回验证不匹配。所有的编程都已完成,但现有的引导加载程序中的数据与上传图像中的引导加载程序副本不匹配。确保您发送了一个正确的.HEX/.BUB文件,该文件与安装的引导加载程序完全匹配。该应用程序必须用Bootloader最初编译和部署时生成的.ySig..s和.MyGe.GLD文件编译。“这个错误告诉我设备是编程的,但我看不出行为有什么变化。引导加载程序使用一个快速闪烁的LED。我试图启动的应用程序第一次快速闪烁相同的LED,然后闪烁它5秒。有人用U1TXRG和U1RXRG做了引导加载程序吗?谁能想到一个不起作用的原因?
以上来自于百度翻译 以下为原文 Hello, I am making a bootloader but I am restricted by the hardware available to me. I am using the EZBL project provided by microship as a guide. I do not have access to CTS and RTS so I have rewritten the code to use the U1TXREG and U1RXREG. Using a Saleae logic analyzer I see that all my data is transferring back and forth correctly. I have the java app send me a byte, then the PIC sends the same byte back as an ACK. This all works. The CRC is wrong as I have not fixed this yet. I am getting the error: "Error: Communications error: remote node aborted with error -9 around blob offset 10707 (of 10707) Read-back verification mismatch. All programming completed, but data in the existing bootloader does not match the bootloader copy in the uploaded image. Make sure you transmitted a correct .hex/.blob file that exactly matches and was built for the installed bootloader. The Application must be compiled with _merge.s and _merge.gld files generated when the bootloader was originally built and deployed." This error is telling me the device was programmed but I do not see any changes in behavior. The bootloader uses one rapid blinking LED. The app I am trying to bootload first rapidly blinks the same LED then flashes it ever 5 seconds. Has anyone made a bootloader with the U1TXREG and U1RXREG? Can anyone think of a reason this is not working? |
|
相关推荐
1个回答
|
|
好的,我想我终于发现了这个错误,所以我还是分享一下吧。首先,必须遵循“EZBL Library Documentation.pdf”中的每一行。现在,我知道了过程,该文档使senseLoL更加敏感:因此:如果要使用uart来引导加载,您需要从ex_boot_uart项目开始。所以你需要在Mplab打开这个项目,然后选择你的PIC模型。但是等等!如果你在HurdRialIpdialIsHealver文件夹中查看,那里有一些图片和它们的DeV板。如果你没有列出,你必须复制其中一个,并基本上复制它为您的硬件。确保你也把你的配置位在这个文件。如果您选择的是未在HaveRealPixalIsIsHER文件夹中列出的PIC,则默认情况下它会选择一个DSIC33。这可能与您的实际硬件不匹配,并且会引起问题。既然已经为实际硬件创建了._initializer,那么编译ex_boot_uart项目。这将创建上面原始帖子中的错误中抱怨的merge.gld和merge.s文件。从库文档.PDF执行-gt;5,将这些文件(Mel.GLD和.s)添加到您的项目中。当你编译你的项目时,它需要知道引导加载程序在哪里,所以它不会覆盖任何一个。您的项目不能定义配置字,因为它们已经在ex_boot_uart中定义,该ex_boot_uart现在通过.gld和.s文件链接。现在,您应该能够编译实际的应用程序项目,并生成一个.hex文件。现在你应该能够使用“Java-jar……”命令将你的实际应用HEX文件发送到你的实际硬件,它应该接收它,编程它,并开始执行它。如果你想编写自己的PC应用程序,请看EZBL通信。基本上,通过串行发送命令,引导加载程序响应。当程序准备就绪时,它将从.blob文件中请求一定数量的字节,然后您的PC应用程序将使用.blob文件进行响应。来回,直到整个程序被发送。
以上来自于百度翻译 以下为原文 Alrighty, I think I finally figured out this error, so I might as well share it. First off, every single line in "EZBL Library Documentation.pdf" must be followed. Now that I know the process, that document makes a lot more sense LoL: So: If you want to use the uart to bootload, you need to start with the ex_boot_uart project. So you need to open that project in Mplab, then choose your PIC model. But wait! If you look in the Hardware_Initializers folder, there are some PICs and their dev boards there. If yours is not listed, you'll have to copy one of them, and essentially duplicate it for your hardware. Make sure you put your config bits in this file as well. If you choose a PIC that is not listed in the hardware_initializers folder, it appears to choose a dspic33 by default. This may not match your actual hardware, and will cause issues. Now that you have created a hardware_initializer for your actual hardware, compile the ex_boot_uart project. This will create the merge.gld and merge.s files complained about in the error in the original post above. Now, go to your actual application project. From the Library Documentation.pdf Execution->#5, add those files (the merge.gld and .s) to your project. When you compile your project, it needs to know where the bootloader is, so it doesn't overwrite any of it. Your project cannot have the configuration words defined, since they are already defined in the ex_boot_uart, which is now linked through the .gld and .s files. Now, you should be able to compile your actual application project, and generate a .hex file. Finally, use your pickit3 (or whatever) to program the .hex from the ex_boot_uart project to your actual hardware. Now you should be able to use the "java -jar ........" command to send your actual application hex file to your actual hardware, and it should receive it, program it, and start executing it. If you want to write your own PC application, look at the EZBL communications.pdf. Basically, you send commands over serial, and the bootloader responds. When it's ready for the program, it asks for a certain number of bytes from the .blob file, which your PC application would then respond with. Back and forth, until the entire program is sent. |
|
|
|
只有小组成员才能发言,加入小组>>
5161 浏览 9 评论
1999 浏览 8 评论
1928 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3171 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2226 浏览 5 评论
731浏览 1评论
613浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
503浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
629浏览 0评论
527浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 23:36 , Processed in 1.288947 second(s), Total 79, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号