[STM32F0] 【STM32F072】+利用IAR EWARM自带checksum工具计算crc16,及ROM校验

[复制链接]
8320|4
 楼主| 笑苍天 发表于 2014-4-9 01:44 | 显示全部楼层 |阅读模式
1 -- crc16的多项式余式简记为0x11021,使用了半字节查表法,兼具较小程序空间及较快计算速度的优点,不追求极限速度的可以考虑这种计算方式
2 -- crc计算函数计算了从地址0x08000000到0x0801fffd的ROM空间数据的crc16
3 -- 利用IAR EWARM的linker的checksum计算crc
4 -- 两个计算方式的结果进行比较,正确则点亮LED5,否则点亮LED3;可应用于需校验ROM空间的合法性
5 -- 工程解压缩到..\STM32F072B-Discovery_FW_V1.0.1\Projects\Peripheral_Examples目录下可直接编译运行

CRC_16BitsCRCMessage.zip

26.22 KB, 阅读权限: 10, 下载次数: 205

IAR EWARM7.10工程代码

评分

参与人数 1威望 +1 收起 理由
kingjason2009 + 1 赞一个!

查看全部评分

mmuuss586 发表于 2014-4-9 13:16 | 显示全部楼层
winrap 发表于 2015-6-1 23:34 来自手机 | 显示全部楼层
下载不了
guolisong1983 发表于 2015-8-10 21:52 | 显示全部楼层
你好,我照你说的步骤去配置CRC,编译没有问题,但是链接始终失败,报错误是ielftool error: The string '__checksum' was not found in the string table 。请问你知道是什么原因吗?
guolisong1983 发表于 2015-8-10 22:13 | 显示全部楼层
本帖最后由 guolisong1983 于 2015-8-10 22:17 编辑

找到原因了。 原来需要额外做一点事情,如下所述:
Include checksum calculation source in your application.
•        
The minimum requirement is that your source uses the symbol __checksum.
•        
Note: If your source doesn't use the symbol __checksum you will get an error message from IELFTOOL: "The string '__checksum' was not found in the string table".
•        
To be able to link anyway, you can turn on Project > Options... > Linker > Extra Options > mark "Use command line options" and add the command line option "--keep __checksum".
加入这个信息后,link 就不再报错了。对了,我的IAR版本:

IAR Embeded workbench for ARM 7.40.3.8938
IAR Embeded workbench common components 7.2.4.3784
您需要登录后才可以回帖 登录 | 注册

本版积分规则

8

主题

106

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部