完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
IDE版本:MPLA4.0编译器XC32 GCC版本V1.44背景信息/上下文:我的Bootloader应用程序在一个绝对RAM地址中使用一个持久的数据标志,“BootSuMeDEYStand”,这是由引导加载程序和运行时程序已知的,当运行时应用程序被触发接受固件升级时,将分配一个唯一的标志值,然后做一个软盘(),其中引导装载器将读取标志值并进入固件升级模式。因此,我需要指示编译器和链接器允许绝对地址和持久内存属性。158提供以下示例,用于在绝对地址指定命名数据区段:INTO FO AyAtditTyx((节(MyStage)),地址(0xA000)),此外,编译器指南显示在第34页上,如何用下面的例子分配持久数据:int TBUDX x属性表最后,XC32汇编程序、链接器和实用工具用户指南在第59页上标识了持久数据对象的节名“坚持”,并且自定义链接器脚本的持久部分如下:.Currase:{ItasyListDe=;.*(.Currest.Actult.*)*(.PBSS.PBSS.*)= AlcIn(4);yTrimeEngult=;} & kSG1L1DATA.MeSO,我将所有上述信息应用到我的单个持久数据项UIT32 BooToMoDeIOM状态中,在定义为0xA000 00 4的持久数据区域中,大小为4字节,正好适合我的数据,如下:在我的自定义链接器脚本中:+=4;*(.Currest.Actult.*)*(.PBSS.PBSS.*)。=对齐(4);有人能对此提出建议/见解/建议吗?谢谢,马卡姆
以上来自于百度翻译 以下为原文 IDE version: MPLAB 4.0 Compiler xc32-gcc version v1.44 Background Info/Context: My bootloader app is using a persistent data flag, 'boot_mode_status' in an absolute RAM address, known by both the bootloader and the run time program, that when the run time app is triggered to accept a firmware upgrade, will assign a unique flag value and then do a SoftReset(), wherein the bootloader will read the flag value and enter a firmware upgrade mode. So, I need to instruct the compiler and linker to allow for BOTH an absolute address and persistent memory attributes. The XC32 Compiler User's Guide, on page 158 provides the following example for designating a named data section at an absolute address: int foo __attribute__((section("mysection"),address(0xA0000004))); Furthermore, the Compiler guide shows on page 34, how to allocate persistent data with the below example: int tblIdx __attribute__ ((persistent)); Finally, the XC32 Assembler, Linker and Utilities User's Guide identifies on page 59 the section name, 'persist' for persistent data objects. And, the Custom Linker script has the persistent section as follows: .persist : { _persist_begin = .; *(.persist .persist.*) *(.pbss .pbss.*) . = ALIGN(4) ; _persist_end = .; } >kseg1_data_mem So I applied all of the above information to my single persistent data item, UINT32 boot_mode_status, in the persistent data region I defined to start at 0xA0000004, with a size of 4 bytes, just big enough for my data, as below: ==================================================================== In my custom linker script: .persist 0xa0000004 : { _persist_begin = .; . += 4; *(.persist .persist.*) *(.pbss .pbss.*) . = ALIGN(4) ; _persist_end = .; } >kseg1_data_mem In my C file: UINT32 boot_mode_status __attribute__((section(".persist"))); ============================================================= The result, was the below link error, “Error: Attributes for section '.persist' conflict with implied attributes” Can anyone lend instruction/insight/advise on this? Thanks, Markham |
|
相关推荐
2个回答
|
|
可能来自以下最近线程的信息有助于:HTTP://www. McCHIP.COM/FUMMS/M98697.ASPX
以上来自于百度翻译 以下为原文 Maybe the information from the following recent thread helps: http://www.microchip.com/forums/m988669.aspx |
|
|
|
我已经阅读了M98699线程,并尝试使用替代属性方法:.Currase0xA000 000 010:{OnthixRealEng=;;+=16;*(.Currest.Actult.*)*(.PBSS.PBSS.*)。= AlgIn(4);yTrimeEngult=;;} & KSK1YDATAYMAMUIT32 32 BooToMeDeFieldAyAtditTyx((持久性,地址(0xA000,010)));在这里,我将链接器中的等效部分分配给起始地址,与16位对齐一致,并且得到下面的新链接器错误。链接错误:无法在0xA000 000 010大小的4链接错误上分配区段'BooToMeDeField':不能分配数据内存,它不应该是疯狂的在一个特定的地址中分配持久数据!有人有见识吗?马卡姆
以上来自于百度翻译 以下为原文 I have read the m98669 thread and have attempted to use the the alternative attribute approach: .persist 0xa0000010 : { _persist_begin = .; . += 16; *(.persist .persist.*) *(.pbss .pbss.*) . = ALIGN(4) ; _persist_end = .; } >kseg1_data_mem UINT32 boot_mode_status __attribute__((persistent,address(0xa0000010))); Where I have allocated the equivalent section in the linker script to correspond with the starting address, conforming with 16 bit alignment and I get the below new linker error: Link Error: Could not allocate section '.boot_mode_status' at 0xa0000010 SIZE 4 Link Error: Could not allocate data memory It really should not be this crazy to allocate persistent data in a specific address! Anyone have insights? Markham |
|
|
|
只有小组成员才能发言,加入小组>>
5244 浏览 9 评论
2035 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3214 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2261 浏览 5 评论
781浏览 1评论
676浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
602浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
684浏览 0评论
581浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 07:36 , Processed in 1.173550 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号