完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨,伙计们。我正在使用Pyr32版本的1.09版、MPLABX 3.5和XC32 V1.42编译器在PIC32 MZ2048 EFH100上使用EnthNETBooLoad。我已经成功地完成和测试了我的主固件(也使用和声)和引导加载程序。固件在没有Bootloader的情况下工作正常,但是当我使用PIC32 Bootloader应用程序V1.2将它们组合起来时,固件启动,但部分地,以太网栈和USB堆栈工作,但是我不能读取任何PIC端口,总是返回零。因此,我开始检查链接器,假设我有内存分配问题,因为这是我的第一个Bootloader项目,我没有任何处理内存分配和链接器的经验。我检查了.map文件来检查内存分配,这是.map文件……文本的一部分。P.IPv4DeNIT 0x9FC2FAFC0xE8 232。文本。0x9FC2FBE40xE8 232。Text .TCPIpH.NbnSnRoad 0x9FC2FCCC 0xE4 228。Text。14 0xE8 232引导内存UAGSESSEtiON地址长度[字节](DEC)描述----------------------------------------------------------------------------------------------------------------------------------0xBFC000的重置.0x220 544复位处理程序。BEVYEXPT 0xBFC3380 0x10 16 BEV异常总KSK1Y-BOOTHOMEM使用:0x230 560 560 0x480 ----------------------------------------------------------------------------------0x24354,148308,76.7%,0x2F380 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Sdata 0x8000 0x3C 60小init数据. SBSS 0x800 000 03C 0x118 280小UNIIT数据. BSS 0x800 00 154 0x80 128未初始化数据.0000630 0x318 792未初始化数据。BSS.ReNONO 0x800 000 948 0x4 4。数据0x800 000 950 0x140 320初始化数据。数据0x800 00 A90 0x1D4 468未初始化数据。数据0x800 00 C64 0x1C 28初始化数据。BSS 0x800 00 C80 0x28 40未初始化数据。BSS.BooBooDeldDATA。ATAYMEM:0xC98 3224×0.6%×0x8000 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------描述-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------不能像预期的那样工作,或者我还有其他问题,我现在还没有意识到。请任何人帮我解决这个问题。我将非常感激。对不起,长的帖子,我已经附加了链接文件,嗯thx很多。
以上来自于百度翻译 以下为原文 Hi Guys. I am working on Ethernet bootloader for PIC32MZ2048EFH100 using hARMony version 1.09, MPlabX 3.5 and XcC32 v1.42 compiler. I have successfully finished and tested my main firmware(also using harmony) and the bootloader as well. the firmware work ok without the bootloader but when i combined them using Pic32 Bootloader Application v1.2 the firmware start but partially, the Ethernet stack and the u*** stack works but i cannot read any of the pic ports, always return zero. so i start to check the linker assuming that i have a memory allocation problem, since this my first bootloader project i don't have any experience how to handle the memory allocation and linkers. i have check the .map file to check the memory allocation here is a part of the .map file ...... text._DRV_ETHPHY_NegCo 0x9fc2f658 0xf4 244 .text._UDPv4TxAckFnc 0x9fc2f74c 0xf4 244 .text._DRV_ETHPHY_Setup 0x9fc2f840 0xec 236 .text.DRV_ETHMAC_PIC32M 0x9fc2f92c 0xe8 232 .text._SYS_TMR_ClientPa 0x9fc2fa14 0xe8 232 .text.TCPIP_IPV4_DeInit 0x9fc2fafc 0xe8 232 .text._TCPIP_StackSyncF 0x9fc2fbe4 0xe8 232 .text.TCPIP_NBNS_Initia 0x9fc2fccc 0xe4 228 .text.DRV_ETHPHY_Setup 0x9fc2fdb0 0xe0 224 .text._DRV_ETHPHY_LinkS 0x9fc2fe90 0x70 112 Total kseg0_program_mem used : 0x24124 147748 76.8% of 0x2ef00 kseg0 Boot-Memory Usage section address length [bytes] (dec) Description ------- ---------- ------------------------- ----------- Total kseg0_boot_mem used : 0 0 kseg1 Boot-Memory Usage section address length [bytes] (dec) Description ------- ---------- ------------------------- ----------- .reset 0xbfc00000 0x220 544 Reset handler .bev_excpt 0xbfc00380 0x10 16 BEV-Exception Total kseg1_boot_mem used : 0x230 560 48.6% of 0x480 -------------------------------------------------------------------------- Total Program Memory used : 0x24354 148308 76.7% of 0x2f380 -------------------------------------------------------------------------- kseg0 Data-Memory Usage section address length [bytes] (dec) Description ------- ---------- ------------------------- ----------- .sdata 0x80000000 0x3c 60 Small init data .***ss 0x8000003c 0x118 280 Small uninit data .bss 0x80000154 0x80 128 Uninitialized data .bss 0x80000630 0x318 792 Uninitialized data .bss.errno 0x80000948 0x4 4 .data 0x80000950 0x140 320 Initialized data .bss 0x80000a90 0x1d4 468 Uninitialized data .data 0x80000c64 0x1c 28 Initialized data .bss 0x80000c80 0x28 40 Uninitialized data .bss.bootloaderData.boo 0x800001e0 0x450 1104 Total kseg0_data_mem used : 0xc98 3224 0.6% of 0x80000 -------------------------------------------------------------------------- Total Data Memory used : 0xc98 3224 0.6% of 0x80000 -------------------------------------------------------------------------- Dynamic Data-Memory Reservation section address length [bytes] (dec) Description ------- ---------- ------------------------- ----------- heap 0x80000cb0 0xafa0 44960 Reserved for heap stack 0x8000bc68 0x74390 476048 Reserved for stack -------------------------------------------------------------------------- it locks ok but for some reason my linker doesn't work as expected, or maybe i have other problem that i am not aware of it right now. please can any one help me with that. i will be most appreciated. sorry for the long post, i have attached the linker file as well. thx a lot Attachment(s) app_mz.txt (55.08 KB) - downloaded 6 times |
|
相关推荐
4个回答
|
|
|
首先要做的是安装EFFIEVIEW插件。它会给你一个程序的图形表示,并且可能指出事情的进展。它比地图文件更容易检查。
以上来自于百度翻译 以下为原文 The first thing to do is install the ElfViewer plugin. It will give you a graphical representation of the program, and will probably point out where things are going. It'll be easier to examine than the map file. |
|
|
|
|
|
非常感谢你的回放,我现在不在办公室。我明天会首先安装这个插件,并根据建议检查内存分配,我会马上发布结果。
以上来自于百度翻译 以下为原文 Thanks a lot for your replay, i am out of the office right now. i will install this plugin first thing tomorrow, and check the memory allocation as suggested, the i will post the result right away. |
|
|
|
|
|
好的,我已经安装了EFFIEVIEW插件,这是结果。我注意到程序开始于0x1D01…但在昨天我上传的链接器中,它指定了0x9D01的起始点…请让我知道,如果你需要更多的信息。
以上来自于百度翻译 以下为原文 OK, I have installed ElfViewer plugin, and here is the result. i have notice that the program start at 0x1D01... but in the linker that i have uploaded yesterday, it specifies the starting point at 0x9D01... please let me know if yo need any more info on this. Attached Image(s) |
|
|
|
|
|
我已经解决了这个问题,在主例程中,固件读取端口B和E,并将它们结合在一个信号UTI16 16中,我已经声明了UTI16以将数据存储在本地函数中。出于某种原因,没有引导加载程序的代码工作得很好,但是当我包含引导加载程序并将数据更改为全局时,它工作得很好,看起来BootLaoDer对本地变量不友好,或者我的链接器也与此相关。请注意,我已经取代了我的链接与和谐产生。谢谢大家,希望这将有助于任何一个类似的问题,在未来。
以上来自于百度翻译 以下为原文 I have solved the problem, in the main routine the firmware reads the Port B and E and combine them in one signal UInt16 data, i have declared a Uint16 to store the data in the local function. for some reason the code without the bootloader works fine but when i include the bootloader and changed the data to global it works just fine, it seems that the bootlaoder is not friendly with local variables, or maybe my linker has to do with that as well. note that I have replaced my linker with harmony generated one. thanks you all, hope this will help any one with similar issue in the future. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
485 浏览 0 评论
5806 浏览 9 评论
2346 浏览 8 评论
2234 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3540 浏览 3 评论
1144浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1114浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
882浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
485浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-8 16:38 , Processed in 0.709945 second(s), Total 80, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2082