完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
使用PIC32 MZ2048 EFM100IPE V4.15i,当我正在编写新的板时,似乎无法获得IPE来更新我的序列号。IPE报告它是成功的,并且显示了它被编程的地址和它所编程的序列号,但是当我检查它实际上在那里时,它显示了序列号被默认的值。这就是我如何声明序列号变量:const Unti32(空间(PROG),地址(0x9D0FC000))MySN=1000;为了创建Sqp文件,我使用以下设置:-顺序-开始值(HEX):A000开始-地址(HEX):1D0FC000 0字节(DEC):4个部分(DEC):10-位置-程序存储器建议?我会很感激你的帮助。
以上来自于百度翻译 以下为原文 Using: PIC32MZ2048EFM100 IPE v4.15 I can't seem to get the IPE to update my serial number when I am programming new boards. The IPE reports that it was successful and shows the address it programmed to and the serial number that it programmed but then when I check what is actually there it shows the value that the serial number is defaulted to. This is how I declare the serial number variable: const uint32_t __attribute__((space(prog),address(0x9D0FC000))) mySn = 1000; To create the SQTP file I use the following settings: -Sequential - Start Value (Hex): A0000 - Start Address (Hex): 1D0FC000 Number of bytes(Dec): 4 Number of parts(Dec): 10 Location - Program Memory Any suggestions? I would appreciate the help. |
|
相关推荐
5个回答
|
|
你如何“检查实际存在什么”?如果你读取程序内存,假设代码保护关闭,你看到预期值了吗?另一个潜在原因是编译器优化。是否启用优化器?如果是这样,你就需要挥发限定符来定义。否则,编译器只需加载一个具有立即常量的寄存器,在这种情况下是1000,而不是执行真正的内存读取。
以上来自于百度翻译 以下为原文 How do you "check what is actually there"? If you read back the program memory, assuming code protection is OFF, do you see the expected value? Another potential cause is the compiler optimization. Do you have optimizer enabled? If so, you'll need the volatile qualifier to go with the definition. Otherwise, the compiler could simply load a register with the immediate constant, in this case, 1000, rather than perform a real memory read. |
|
|
|
在使用IPE的读函数(这是一个英特尔扩展的HEX文件)读回程序存储器后,我意识到IPE正在写入正确的地址,但是我的默认值被写入到不同的位置。易失性UTI32 32 tπ属性((空间(PROG),地址(0x9D0FC000)))MySn= SERI当我指定0x9D0FC000时,我的缺省值被写入地址0x1D014000,该程序与程序Flash中的0x1D0FC000相同。IPE正在写入正确的地址0x1D0FC000。我的变量声明似乎仍然不正确。我试着加入挥发性物质。还有其他建议吗?如何指定变量的绝对地址?
以上来自于百度翻译 以下为原文 After reading back the program memory using IPE's read function (which is a intel-extended hex file) I realized that the IPE is writing to the correct address but my default value is being written to a different location. volatile uint32_t __attribute__((space(prog),address(0x9D0FC000))) mySn = SERIAL_NUMBER; My default is being written to the address 0x1D014000 when I am specifying 0x9D0FC000 which believe is the same as 0x1D0FC000 in program flash. The IPE is writing to the correct address 0x1D0FC000. It seems my variable declaration is still incorrect. I tried adding volatile. Any other suggestions? How do you specify an absolute address for a variable? |
|
|
|
检查.map文件以确认MySN的位置。
以上来自于百度翻译 以下为原文 Check the .map file to confirm the location of mySn. |
|
|
|
这应该很简单:.map文件应该说:
以上来自于百度翻译 以下为原文 That should be pretty straightforward: // main.c volatile const uint32_t __attribute__((space(prog),address(0x9D0FC000))) mySn = 0x11223344; and the .map file should say: |
|
|
|
你修好了!在我将语句更改为:const易失性UTI32 32×Ty属性((空间(PROG),地址(0x9D0FC000)))MySn= SerialSL号之后,我能够在.map文件中找到正确的地址;我还通过使用IPE编程新的序列号来检查它,最后它改变了它。非常感谢!
以上来自于百度翻译 以下为原文 You fixed it! I was able to find the correct address in the .map file after I changed the statement to: const volatile uint32_t __attribute__((space(prog),address(0x9D0FC000))) mySn = SERIAL_NUMBER; I also checked by programming a new serial number using the IPE and it finally changed it. Thank you very much! |
|
|
|
只有小组成员才能发言,加入小组>>
5160 浏览 9 评论
1998 浏览 8 评论
1927 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3170 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2225 浏览 5 评论
729浏览 1评论
613浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
503浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
628浏览 0评论
526浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 13:00 , Processed in 0.796223 second(s), Total 84, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号