Checksum calculation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Checksum calculation

Jump to solution
3,565 Views
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?!
 
 
Labels (1)
Tags (1)
0 Kudos
1 Solution
739 Views
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

View solution in original post

0 Kudos
3 Replies
739 Views
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 Kudos
740 Views
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 Kudos
738 Views
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 Kudos