Checksum calculation

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Checksum calculation

跳至解决方案
4,537 次查看
markiscarabas
Contributor I
Hi,
I need to checksum (crc) the area of read_only memory. I am trying to use the embedded checksum algorithms. My prm file looks like:
 
NAMES END
SEGMENTS 
   RAM_BOOT = READ_WRITE       0x2000 TO 0x3FFF;
   ROM_BOOT = READ_ONLY        0xF802 TO 0xFCFF FILL 0xFF;
END
PLACEMENT
   DEFAULT_ROM                  INTO  ROM_BOOT;
   DEFAULT_RAM                  INTO  RAM_BOOT;
   
END
CHECKSUM
CHECKSUM_ENTRY
METHOD_CRC16 POLY 0x1021 OF READ_ONLY 0xF802 TO 0xFFFF INTO READ_ONLY 0xF800 SIZE 2
UNDEFINED 0xFF
END
END
 
 
It looks like everything works OK as soon as I am using the defined in prm file section. The problem here is that I am also using some absolute code positioning and this memory area is not specified in prm file....It looks like the checksum routine does not know what is located at my absolute addresses?!
 
 
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,711 次查看
CompilerGuru
NXP Employee
NXP Employee
In the release notes to the HC12 V4.5, linker version V5.0.29, there are entries which may explain your problem.
As HC12 V4.5 is downloadable from the web, I would suggest that you try it with this version first.

Daniel

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,711 次查看
markiscarabas
Contributor I

Thanks,

My CW is for HC12  3.1 Build 4047. It will take me some time to create the simple demo code. Linker rev is  5.0.9.0  9/7/2003.

0 项奖励
回复
1,712 次查看
CompilerGuru
NXP Employee
NXP Employee
In the release notes to the HC12 V4.5, linker version V5.0.29, there are entries which may explain your problem.
As HC12 V4.5 is downloadable from the web, I would suggest that you try it with this version first.

Daniel
0 项奖励
回复
1,710 次查看
CompilerGuru
NXP Employee
NXP Employee
Which version of CW (and more specifically, the linker) are you using?
If not using the latest and greatest already, can you try it?
Can you provide a complete (but as simple as possible), linking sample?
Daniel
0 项奖励
回复