Ck

The -ck option is for calculating a hash value. The usage of this option is:

-ck=start-end@dest [+offset][wWidth][tCode][gAlgorithm][pPolynomial][rwidth]

where:

All numerical arguments are assumed to be hexadecimal values, except for the algorithm selector and result width, which are assumed to be decimal values.

A typical example of the use of the checksum option is:

-ck=0-1FFF@2FFE+2100w2g2

This will calculate a checksum over the range 0 to 0x1FFF and program the checksum result at address 0x2FFE. The checksum value will be offset by 0x2100. The result will be two bytes wide.

Table 1. Hexmate Hash Algorithm Selection
Selector Algorithm Description
-5 Reflected cyclic redundancy check (CRC).
-4 Subtraction of 32 bit values from initial value.
-3 Subtraction of 24 bit values from initial value.
-2 Subtraction of 16 bit values from initial value.
-1 Subtraction of 8 bit values from initial value.
1 Addition of 8 bit values from initial value.
2 Addition of 16 bit values from initial value.
3 Addition of 24 bit values from initial value.
4 Addition of 32 bit values from initial value.
5 Cyclic redundancy check (CRC).
7 Fletcher’s checksum (8 bit calculation, 2-byte result width).
8 Fletcher’s checksum (16 bit calculation, 4-byte result width).
10 SHA-2 (currently only SHA256 is supported)

See Hash Functions for more details about the algorithms that are used to calculate checksums.