完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,所有的,当我试图建立和下载我的Bootloader到PIC32 MZ1024EFH100目标,我得到以下信息:我没有问题,如果我建立一个应用程序,并下载到程序Flash。Bootloader是大约62kBand,我读到的组合启动闪存面板是160kb,所以我是ASSUM我的链接器脚本是错误的,虽然它是由和声生成的,我修改了3行来使用闪存面板。谁能告诉我哪里出错了。我的链接器脚本更改在下面,如果更改在或失败,则失败。谢谢,
以上来自于百度翻译 以下为原文 Hi All, When I attempt to build and download my bootloader to the PIC32MZ1024EFH100 target I get the following messages: Loading symbols from C:/microchip/hARMony/Mercury-Marine-LCD/v1_10/apps/LCD_Bootloader_100/firmware/LCD_Bootloader_100.X/dist/default/debug/LCD_Bootloader_100.X.debug.elf... Loading code from C:/microchip/harmony/Mercury-Marine-LCD/v1_10/apps/LCD_Bootloader_100/firmware/LCD_Bootloader_100.X/dist/default/debug/LCD_Bootloader_100.X.debug.elf... Warning: C:/microchip/harmony/Mercury-Marine-LCD/v1_10/apps/LCD_Bootloader_100/firmware/LCD_Bootloader_100.X/dist/default/debug/LCD_Bootloader_100.X.debug.elf contains code that is located at addresses that do not exist on the PIC32MZ1024EFH100. Code incompletely loaded. Configuration Bits: address 0x1FC0FFC4: FPLLODIV = 0 does not match any valid value in the device database. Setting to the default value. Configuration Bits: address 0x1FC0FFC8: FNOSC = 0 does not match any valid value in the device database. Setting to the default value. Configuration Bits: address 0x1FC0FFCC: ICESEL = 0 does not match any valid value in the device database. Setting to the default value. Loading completed I have no problems if I build as an application and download into program flash. The bootloader is approx 62KByte and I read that the combined Boot Flash panels is 160KB so I'm assuming my linker script is wrong, although it was generated by harmony and I modified 3 lines to use both flash panels. Can anyone tell me where I am going wrong. My linker script changes are below and it fails if the changes are in or not. Thanks, kseg0_program_mem (rx) : ORIGIN = 0x9fc01000, LENGTH = 0x00026000 protected_reg3 : ORIGIN = 0x9FC14000, LENGTH = 0x20000-0x14000 kseg0_boot_mem : ORIGIN = 0x9fc004b0, LENGTH = 0x00000000 kseg1_boot_mem : ORIGIN = 0xbfc00000, LENGTH = 0x00000480 /* kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x480 */ /* kseg0_program_mem (rx) : ORIGIN = 0x9fc01000, LENGTH = 0xFF00 - 0x1000 */ /* kseg0_boot_mem : ORIGIN = 0x9fc004b0, LENGTH = 0x00000000 */ kseg1_boot_mem_4B0 : ORIGIN = 0xBFC004B0, LENGTH = 0x1000 - 0x4B0 config_BFC0FF40 : ORIGIN = 0xBFC0FF40, LENGTH = 0x4 etc.. |
|
相关推荐
6个回答
|
|
我记得Microchip的Larry Standage曾经访问过这个论坛,他说他有办法把两个BFM面板组合在一起。也许他可以插手给你一些指点。我不知道怎么做,但我可以告诉你困难。当你组合两个BFM面板时,它们不会形成连续的内存区域,因为保留了BFM的某些区域。链接器处理常规程序内存分配的方式是使用这一部分语句:正如您在这里所看到的,文本输出部分只能到一个“区域”,即KSG00SuffyTyMeM。因此,如果你有漏洞(保留区),你需要一个方法来保存它们,以防止链接器在这些区域中放置任何可执行文件。希望这对你有意义。
以上来自于百度翻译 以下为原文 I remember Larry Standage from Microchip who visits this forum once a while said he had a way to combine two BFM panels together. Perhaps he can chime in and give you some pointers. I don't know how to do it but I can tell you what the difficulty is. When you combine two BFM panels, they don't form a contiguous memory region because certain regions of BFM are reserved. The way linker handles regular program memory allocation is by using this section statement: /* Code Sections - Note that input sections *(.text) and *(.text.*) * are not mapped here. The best-fit allocator locates them, * so that .text may flow around absolute sections as needed. */ .text : { *(.stub .gnu.linkonce.t.*) KEEP (*(.text.*personality*)) *(.mips16.fn.*) *(.mips16.call.*) *(.gnu.warning) . = ALIGN(4) ; } >kseg0_program_mem As you can see here, .text output section can only go to one "region", i.e., kseg0_program_mem. So if you have holes (reserved area) in kseg0_program_mem, you would need a way to reserve them in kseg0_program_mem to prevent linker putting any executable in those areas. Hope this makes sense to you. |
|
|
|
是的,我们通过使BFM成为一个内存,然后使用填充命令来屏蔽那些不可用的区域来实现这一点。警告是因为MPLAB X看到了填充区域,但是不知道如何处理它们。警告可以忽略。但是,如果您想确定的话,今年早些时候,我们找到了一种方法,从链接器脚本中的HEX文件中删除填充数据。也就是说,在填充区域名称之后添加(NOLOAD)。所以:FIL1:成为FIL1(NOLAOD):
以上来自于百度翻译 以下为原文 Yes, we did it in Harmony by making it seem like the BFM was one memory, and then using FILL commands to block out the areas that are not available. The warning comes because MPLAB X sees the fill regions, but doesn't know what to do with them. The warning can be ignored. But if you want to be certain, earlier this year we found a way to remove that fill data from the hex file in the linker script. That is by adding (NOLOAD) after the fill region name. So: .fill1 : becomes .fill1 (NOLOAD): |
|
|
|
拉里,我还不是一个和睦的用户。在这种情况下,可以发布一些链接器脚本代码来显示如何使用填充命令吗?谢谢。
以上来自于百度翻译 以下为原文 Larry, I am not quite a Harmony user yet. Would that be possible to post some linker script code showing how to use the FILL command in this case? Thanks. |
|
|
|
您好,您可以参考下面的链接器脚本,从基本的Bootloader演示应用程序从HythSuffer文件:App/Base/Bootloader /固件/SRC/StulySCOFIG/UDPYPIC32 MZYEFSKS/BTLYMZ.LD
以上来自于百度翻译 以下为原文 Hi, You can refer to the below linker script from the basic bootloader demo application from the harmony installer File : apps/basic/bootloader/firmware/src/system_config/udp_pic32mz_ef_sk/btl_mz.ld MEMORY { kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x480 kseg0_program_mem (rx) : ORIGIN = 0x9fc01000, LENGTH = 0x2FF00 - 0x1000 protected_reg3 : ORIGIN = 0x9FC14000, LENGTH = 0x20000-0x14000 kseg0_boot_mem : ORIGIN = 0x9fc004b0, LENGTH = 0x00000000 kseg1_boot_mem_4B0 : ORIGIN = 0xBFC004B0, LENGTH = 0x1000 - 0x4B0 config_BFC0FF40 : ORIGIN = 0xBFC0FF40, LENGTH = 0x4 config_BFC0FF44 : ORIGIN = 0xBFC0FF44, LENGTH = 0x4 .......... .fill1 : { FILL(0xFF); . = ORIGIN(protected_reg3) + LENGTH(protected_reg3) - 1; BYTE(0xFF) } > protected_reg3 ....... |
|
|
|
非常感谢所有的回复。虽然我最初的链接器脚本是由Hyror生成的,但它没有足够的智慧来证明我需要使用两个引导加载程序Flash面板。我已经找到了链接器脚本修改来创建-我认为是相邻的内存,但是我的Bootloader现在下载和执行没有任何问题或警告。我最后的链接器脚本看起来像:
以上来自于百度翻译 以下为原文 Thanks very much for all the replies. Although my initial linker script was generated by Harmony, it did not have the smarts to figure out that I required the use of both boot loader flash panels. I had already found the linker script modifications to create - what I thought was contiguous memory but was missing the fill commands. My bootloader now downloads and executes without any problems or warnings. My final linker script looks like:MEMORY { /* This change uses both bootloader banks to increase space. */ kseg0_program_mem (rx) : ORIGIN = 0x9fc01000, LENGTH = 0x00026000 protected_reg3 : ORIGIN = 0x9FC14000, LENGTH = 0x20000-0x14000 kseg0_boot_mem : ORIGIN = 0x9fc004b0, LENGTH = 0x00000000 kseg1_boot_mem : ORIGIN = 0xbfc00000, LENGTH = 0x00000480 /* kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x480 */ /* kseg0_program_mem (rx) : ORIGIN = 0x9fc01000, LENGTH = 0xFF00 - 0x1000 */ /* kseg0_boot_mem : ORIGIN = 0x9fc004b0, LENGTH = 0x00000000 */ kseg1_boot_mem_4B0 : ORIGIN = 0xBFC004B0, LENGTH = 0x1000 - 0x4B0 ... ... ... .fill1 (NOLOAD): { FILL(0xFF); . = ORIGIN(protected_reg3) + LENGTH(protected_reg3) - 1; BYTE(0xFF) } > protected_reg3 } |
|
|
|
我认为这个链接器脚本有一个潜在的错误。我很确定1FC0YFF00和1FC0YFF3C之间的区域,恰好在配置词启动之前,也是一个保留区域。
以上来自于百度翻译 以下为原文 I think this linker script has a potential bug in it. I am pretty sure the area between 1FC0_FF00 and 1FC0_FF3C, just right before where configuration words start, is also a reserved area. |
|
|
|
只有小组成员才能发言,加入小组>>
5244 浏览 9 评论
2035 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3209 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2260 浏览 5 评论
779浏览 1评论
672浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
598浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
682浏览 0评论
579浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 00:46 , Processed in 1.382025 second(s), Total 88, Slave 71 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号