< Optimizing Linkage Editor (rlink) Options / Output Options >
CRC (cyclic redundancy check) operation is done for the specified range of section data in the order from the lower to the higher addresses, and the operation result is output to the specified output address in the specified endian mode. |
Specify one of the following as the operation method. If the specification of the operation method is omitted, operation is performed assuming that CCITT has been specified. |
The specifiable value of <initial value> ranges from 0x0 to 0xFFFFFFFF when the operation method is 32-ETHERNET, and from 0x0 to 0xFFFF for other cases. |
When <initial value> is omitted, operation is performed on the assumption that 0x5 has been specified for the operation method of SENT-MSB, 0xFFFF for CCITT, 0xFFFFFFFF for 32-ETHERNET, and 0x0 for other cases. |
The operation result is output to the specified output address by writing at the offset location from the beginning of the area allocated by size in the byte order specified with BIG or LITTLE. 0 is output from the beginning of the allocated area until immediately before the offset location. |
When the size and offset are omitted, the size is assumed to be 2 bytes and the offset is assumed to be 0. |
When the space option is not specified, space=FF is assumed for CRC operation for the unused areas in the operation range. Note that 0xFF is only assumed for CRC operation for the unused areas, but the areas are not actually filled with 0xFF. |
In this example, CRC will be calculated for the range from 0x1000 to 0x2FFD and the result will be output to address 0x2FFE. |
When the space option has not been specified, space=0xFF is assumed for calculation of free areas within the target range. |
Since the space option has not been specified, the free areas are not output to the out.mot file. 0xFF is used in CRC for calculation of the free areas, but will not be filled into these areas. |
The address where the result of CRC will be output must be included in the output range specified with the output option. |
rlink *.obj -form=stype -start=P1/1000,P2/1800,P3/2000 |
In this example, CRC will be calculated for the two ranges, 0x1000 to 0x17FF and 0x2000 to 0x27FF, and the result will be output to address 0x2FFE. |
Since the space option has been specified, the free areas are output to the out.mot file. 0x7F will be filled into the free areas. |
The order that CRC is calculated for the specified address ranges is not the order that the ranges have been specified. CRC proceeds from the lowest to the highest address. |
Even if you wish to use the crc and space options at the same time, the space option cannot be set as random or a value of 2 bytes or more. Only 1-byte values are valid. |
rlink *.obj -form=stype -start=P1,P2/1000,P3/2000 |
In this example, CRC will be calculated for the two ranges, 0x1000 to 0x1FFD and 0x2000 to 0x2FFF, and the result will be output to address 0x1FFE. |
Since the space option has not been specified, the free areas are not output to the flmem.mot file. 0xFF is used in CRC for calculation of the free areas, but will not be filled into these areas. |
When multiple load module files are input, the compiler outputs a warning message and ignores this option. |
This option is valid when the output format is form={hexadecimal | stype}. For any other cases, an error is output and execution is terminated. |
When the space option is not specified and the operation range includes an empty area that is not output, 0xFF is assumed to be stored in the unused area during CRC operation. |
An error is output and execution is terminated if the CRC operation range includes an overlaid area. |
The following can be specified for the size and offset when specifying the endian. For any other cases, an error is output and execution is terminated. |
Sample Code: The sample code shown below is provided to check the result of CRC figured out by the crc option. The sample code program should match the result of CRC by rlink. |