完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我的任务是评估一个已经在该领域工作多年的设备,并且可能已经经历了辐射暴露的影响。我有原始的十六进制文件,它被编程到PIC18F2431。我想从PIC中读取程序内存,并比较这两个十六进制文件来检查辐射效应(Ext位翻转)。考虑到这一点,我尝试开发一种使用测试PIC来实现这一方法的方法。我在MPLAX中建立了一个项目(我们称之为TEST1),并将它编程到我的测试PIC上。但是当我“读取设备内存到文件”时,我得到的HEX文件与l.MyOpjtudio.g..x/Dist/Deal/Dealp/中的HEX文件不匹配。这两个HEX文件有一些匹配的部分,但也有很多差异。我看到的其中一个差异似乎是闪存的未使用部分。在十六进制I中读取PIC的每个内存位置都有一个条目,但是在HEX文件中/DIST/默认/分发/未使用的闪存位置不包括在内。然而,这并不是这两个十六进制文件之间唯一的区别。我创建了一个新的项目(我们称之为TEST2),使用了读取测试PIC的HEX文件,MPLAB中的项目仪表板中的校验和匹配TEST1的校验和。参考PIC18F2431编程规范,我发现这个校验和是基于Flash存储器的用户可访问部分和配置寄存器来计算的。因此,似乎Test1和Test2的这些部分是匹配的。然而,我仍然对这些差异感到好奇。你能解释一下为什么会发生这种情况吗?有没有另一种方法来比较PIC上的程序和原来的程序?
以上来自于百度翻译 以下为原文 I'm tasked with evaluating a device which has been in the field for a number of years and may have experienced effects from radiation exposure. I have the original hex file that was programmed on to the PIC18F2431. I would like to read the program memory off the PIC and compare the two hex files to check for radiation effects (ex. bit flips). With that in mind I'm trying to develop a method to do this using a test PIC. I've built a project (let's call it Test1) in MPLAB X and programmed that on to my test PIC. But when I "Read Device memory to file" the hex file I get does not match the hex file in One of the discrepancies I'm seeing appears to be the unused portion of Flash memory. In the hex I read off the PIC every memory location has an entry, but in the hex file in /dist/default/distribution/ the unused flash memory locations are not included. However this is not the only difference between the two hex files. I created a new project (let's call it Test2) using the hex file I read off the test PIC and the checksum in the project Dashboard in MPLAB X matches the checksum of Test1. Referring to the PIC18F2431 Programming Spec I found that this checksum is calculated based on the user accessible portion of Flash memory and the configuration registers. So it seems that these portions of Test1 and Test2 match. However I am still curious about the discrepancies. Can you explain why this may be happening? Is there another method to compare the program on a PIC to what was originally programmed on to it? |
|
相关推荐
3个回答
|
|
这正是你所期望的。编译器在其输出中不包括未使用的内存位。您应该使用从新编程的PIC读回作为引用,而不是编译器的输出。
以上来自于百度翻译 以下为原文 That is exactly what you should expect. The compiler does not include unused bits of memory in its output. You should use a readback from a freshly programmed PIC as your reference, not the output from the compiler. |
|
|
|
对于一个新项目,您可以用常量填充未使用的内存。
以上来自于百度翻译 以下为原文 For a new project you could fill unused memory with a constant Attached Image(s) |
|
|
|
取原始十六进制并将其加载到IPE(导入)中,然后保存它(导出)。这将给你所有丢失的填充物。读取PIC,然后导出它。然后,可以将这两个文件与任何文件比较实用程序进行比较(类似于比较)。
以上来自于百度翻译 以下为原文 Take the Original Hex and Load it in to IPE.(Import) Then save it (Export). This will give you all the missing Padding. Read the PIC, Then export it also. You can then compare the two files with any file compare utility (like Beyond Compare) |
|
|
|
只有小组成员才能发言,加入小组>>
5158 浏览 9 评论
1997 浏览 8 评论
1926 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3169 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2222 浏览 5 评论
722浏览 1评论
605浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
493浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
619浏览 0评论
518浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-19 07:34 , Processed in 1.203524 second(s), Total 81, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号