完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有自己的Flash更新实用程序,运行在RAM中。它运行在RAM包括所有常量/变量所以Flash都可以更新。
这是很容易使用的文件到内存,让我的例程:http://www.cypress.com/?ID=4和57109; 但这些例程调用cywriterowdata()和cywriterowconfig是cyflash。C是生成的代码与创造者。我要把这些变成RAM以及或者Flash更新Flash不可能下载期间的变化! 虽然可以进入并手动添加 (A1)((RAMCODE)部分)空隙RAMFUNC(无效); 在cyflash每个功能。C,似乎必须在客户的链接文件,将所有cm3gcc_custom.ld例程从这个文件到一个选项,而不是文本数据段。 有人知道怎么做吗?谷歌搜索一直有细节不符合我想要做的… 以上来自于百度翻译 以下为原文 I have my own FLASH update utility that runs in RAM. It has to run in RAM including all constants/variables so the rest of flash can be updated. It was easy enough to get my routines into RAM using the documents at: http://www.cypress.com/?id=4&rID=57109#Section6 But these routines call CyWriteRowData() and CyWriteRowConfig which are in CyFlash.c which is generated code from Creator. I have to get these into RAM as well or else the flash updater won't work as FLASH might change during the download! While I could go in and manually add the __attribute__ ((section(".ramcode"))) void ramFunc(void); to every function in CyFlash.c, it seems like there must be an option in the customer linker file cm3gcc_custom.ld that would push all routines from this file into the .data section instead of .text. Does anyone have an idea how to do this? Google searches keep coming up with details that don't match what I'm trying to do... |
|
相关推荐
5个回答
|
|
GCClinker的文件是:http://ftp.gnu.org/old-gnu/manuals/ld-2.9.1/html_node/ld_21.html
但是,当我刚刚投入: 数据:对齐(8){ __cy_region_start_data =。;保持(*(,JCR))*(。了PLT)*(*(了)。shdata)*(。数据。数据。*。GNU。linkonce D. *)cyflash。O *(。ramcode)。=对齐(8);*(.RAM); 但这给了我一个链接错误生成错误:找不到cyflash啊 如果Ichange to *(Cyflash) 建立在文件的程序仍在。文本。 从.map文件: 。text.cysettempint 0x00005188 0x90。 i2ccompliancechecker CortexM3 arm_gcc_473调试,(cyflash。O)。text.cysettemp 0x00005218 0x24。 i2ccompliancechecker CortexM3 arm_gcc_473调试,(cyflash。O)0x00005218 cysettemp 以上来自于百度翻译 以下为原文 The GCC linker documentation is at: http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_21.html but when I just put in: .data : ALIGN(8) { __cy_region_start_data = .; KEEP(*(.jcr)) *(.got.plt) *(.got) *(.shdata) *(.data .data.* .gnu.linkonce.d.*) CyFlash.o *(.ramcode) . = ALIGN (8); *(.ram) _edata = .; } >ram AT>rom But this gives me a linker error - Build error: cannot find CyFlash.o If I change it to *(CyFlash.o) then it builds but the routines in the file are still in .text. From the .map file: .text.CySetTempInt 0x00005188 0x90 .CortexM3ARM_GCC_473DebugI2CComplianceChecker.a(CyFlash.o) .text.CySetTemp 0x00005218 0x24 .CortexM3ARM_GCC_473DebugI2CComplianceChecker.a(CyFlash.o) 0x00005218 CySetTemp |
|
|
|
考虑在这里提交一个链接到你的帖子的例子。
提交一个技术案例 CyPress网站 “支持” “技术支持” “创建一个MyCase'” 问候,Dana 以上来自于百度翻译 以下为原文 Consider filing a CASE with a link to your post here. To file a tech case - www.cypress.com “Support” “Technical Support” “Create a MyCase” Regards, Dana |
|
|
|
好的,我打开了一个链接到这个帖子的MyCase.
谢谢Dana 以上来自于百度翻译 以下为原文 OK - I opened a MyCase with a link to this post. Thanks Dana |
|
|
|
你好,
1。通过修改LD文件,不可能直接将“CyFlash。O”或PSoC Creator生成的任何“.c”文件的对象文件包含在一节中。这背后的原因是因为默认情况下,属于对象文件的函数将包含在Flash中,因此将其添加到SRAM中会引发错误,称存在多个定义。通常可以使用TopeDyfile文件语法(HTTPS://SooStury.Org/BiTurss/DOCS-2.24/LD/Endo-Studi-Basix.HTML)排除通配符中的输入文件。但是,CyFlash .O存储在项目的.file中,因此不能单独从Flash部分排除。因此,将自定义函数中所有“函数”放在“.o”文件中的唯一方法是在“.h”文件(CyFlash .h)中的每个函数声明中都包含“y-AtItTeTyx”语法。 2。如果您自己定义了一些源文件和头文件,并且如果您想将对应于头文件的“.o”文件放置在SRAM /自定义节中,则需要遵循以下步骤:(i)在.DATA节中,用.text节引用添加完整路径和文件名例如,.CORTEXM3ARMGCGC.43Debug MyFrase.O(.Text .Text)*,其中包括MyFrase.O在SRAM中。(ii)我需要从Flash中排除这个“.o”文件,这样对于同一个函数没有多个定义。因此,在.text部分中,用“*(.text .*.GNU.LIKON.T.*)”替换“*”(排外文件(.CORTEXM3ARMGGCUC43Debug MyField.O).text CopyDeFig文件(.CORTEXM3ARMGGCK433Debug MyField.O).text .*GNU.LIKONT.T.*)。这将从Flash中删除MyFrase.O。 以上来自于百度翻译 以下为原文 Hi, 1. It is not possible to directly include "CyFlash.o" or the object file of any ".c" file generated by PSoC Creator, in a section by modifying the LD file. The reason behind this is because the functions belonging to the object file will be included in Flash by default and hence adding it into SRAM would throw errors saying that there are multiple definitions. It is normally possible to exclude an input file from a wildcard using the EXCLUDE_FILE syntax ( https://sourceware.org/binutils/docs-2.24/ld/Input-Section-Basics.html ). However, CyFlash.o is stored inside the project's .a file, so it cannot be excluded individually from the flash section. So, the only way to place all the functions in that ".o" file in your custom section would be to include "__attribute__" syntax in each and every function declaration in the ".h" file (CyFlash.h). 2. If you have defined some source and header files on your own and if you would like to place the ".o" file corresponding to a header file in the SRAM/ custom section, you need to follow the following steps: (i) In the .data section, add the full path & file name with the .text section references, for example: .CortexM3ARM_GCC_473Debugmyfile.o(.text .text.*) This includes myfile.o in SRAM. (ii) I need to exclude this ".o" file from Flash so that there are no multiple definitions for the same function. So,in the .text section, replace " *(.text .text.* .gnu.linkonce.t.*)" with "*(EXCLUDE_FILE(.CortexM3ARM_GCC_473Debugmyfile.o) .text EXCLUDE_FILE(.CortexM3ARM_GCC_473Debugmyfile.o) .text.* .gnu.linkonce.t.*)". This removes myfile.o from Flash. |
|
|
|
我对这个问题的解决方案是将几个例程需要从cyflash。C和重命名myflash。C与__attribute推到RAM代替闪光。我要复印几CySpc小例程。C以及更换一个简单的for循环memcpy(memcpy也将Flash)。
我想我已经得到所有的代码在内存中,一旦我叫它永远在RAM可以因此改写所有Flash下载图像。总有一个失败的机会,就需要重新编程,通过一个miniprog3但这个机会很小,我可以接受它。 不是简单地把程序从flashto SRAM但是我各种语法错误但有装载机作为优雅(非常小的诊断信息)或重复定义如上所述。 以上来自于百度翻译 以下为原文 My solution to this problem is to copy the few routines I needed from CyFlash.c and rename them MyFlash.c with the __attribute to push them into RAM instead of FLASH. I had to copy a couple of small routines from CySpc.c as well and replace memcpy with a simple for-loop (memcpy would also be in FLASH). I think I've now got all this code in RAM so once I call it it'll always be in RAM and I can thus rewrite all of FLASH with the downloaded image. There is always a chance of failure which would require reprogramming via a miniprog3 but this chance is low enough that I can accept it. Not as elegant as simply pushing the routines from FLASH to SRAM but I tried all sorts of syntax but either got loader errors (with very little diagnostic info) or duplicate definitions as mentioned above. |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2113 浏览 1 评论
1860 浏览 1 评论
3673 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1794 浏览 6 评论
1540 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
582浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
434浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
445浏览 2评论
393浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
1024浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-31 05:35 , Processed in 0.973383 second(s), Total 85, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号