完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,我正在询问共享功能,也许更具体的对象,比如系统文件,USB服务,和SPI通信在引导到应用程序之间。我有一个USB主机启动和USB主机MSD应用程序,并通过和谐V2Y05和IDE V4.05运行。应用程序和引导程序都对文件系统进行编程,在程序闪存的末尾找到对象并在引导和应用程序之间共享它是很好的。该应用程序正在增长到PIC32 MX695F512H的存储器的程度,并且合并冗余将是很好的。我在编译器链接器手册中一直在阅读这篇文章,这主要是链接器的问题,但是引用来自应用程序的函数或对象并不是很明显。我想指出在Bootloader中放置的对象中的函数的静态位置。你成功地编程了这样的怪兽,还有一些描述你的方法的阅读材料,你能给我指出那个材料吗?谢谢你考虑我的问题!西洛林格
以上来自于百度翻译 以下为原文 Hello, I am inquiring about sharing functions and maybe more specifically objects like system files, USB services, and or SPI communication across the boot to the app. I have a USB host boot and u*** host MSD app up and running through hARMony v 2_05 and IDE v4.05. The app and boot both program the file system, and it would be nice to locate the object at the end of the program flash and share it between the boot and the app. The application is growing to the extent of the memory of the PIC32MX695F512H and it would be nice to consolidate the redundancy. I have been reading about this in the compiler linker manual and this is primarily a linker problem, but to reference the functions or objects from the applications is not so obvious. I want to point to the static position of the functions within the objects placed by the bootloader. Have you successfully programmed such a beast and was there some reading material describing your method, could you point me to that material? Thank you for considering my problem! Cy Drollinger |
|
相关推荐
1个回答
|
|
首先,您是否考虑从Bootloader中删除USB主机代码。我不知道你的设计细节,但在我们的设计中,我们有一个SPI闪存,用于下载新的代码。应用程序从USB、Internet、SD卡或任何地方获得新代码,并在SPI闪存中写入代码的新版本。Bootloader将代码从SPI Flash传输到程序存储器,这意味着很容易放弃一次失败的下载,因为只有SPI被写入,所以在SPI闪存中携带一个固件图像和在发生故障时重载和旧图像更容易携带。3)自举器是简单的,因为它只是传输数据,所以不太可能有BUGS4),引导加载程序非常小。如果你想用USB驱动程序保持引导加载程序。在Bootloader和主应用程序之间重用代码是可能的,1)保留一个程序存储器的一部分,它可以从APP和Bootloader访问,这意味着存储器的物理地址必须从两个固件中得知。2)在应用端,构造当您想在应用程序侧使用一个函数时,要在Bootloader端上写入所有函数的函数指针表,并将其写入Bootloader端。转到共享内存,并根据其在共享结构上的位置查找函数指针的地址,然后调用函数。
以上来自于百度翻译 以下为原文 First, did you consider removing the USB host code from the bootloader. I do not know the details of your design, but in our designs we have a SPI flash reserved for downloading new code. the application gets the new code form the USB, Internet, SD card or wherever, and writes the new version of the code in the SPI flash. The bootloader transfers the code from SPI flash to program memory. This means 1) It is easy to abandon a failed download, since only the SPI was written 2) Its easy to carry more that one firmware image in SPI flash and reload and older image when failures occur. 3) The bootloader is simple, since it just transfers data, so is less likely to have bugs 4) The bootloader is very small. If you want to keep the bootloader with the USB driver. It is possible to re-use code between the bootloader and the main application, 1) Reserve a section of program memory that can be accesses from both app and bootloader, this means that the physical address of the memory must be known from both pieces of firmware. 2) On the application side, construct a table of function pointers for all the functions you wish to share, and write the structure into the shared memory 3) On the bootloader side, when you want to use a function on the application side. go to the shared memory and look up the address of function pointer by its position on the shared structure, then call the function. |
|
|
|
只有小组成员才能发言,加入小组>>
5055 浏览 9 评论
1940 浏览 8 评论
1877 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3094 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2161 浏览 5 评论
603浏览 1评论
470浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
323浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
497浏览 0评论
405浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-9-13 00:48 , Processed in 1.285600 second(s), Total 77, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191