Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053B-page 100
 2012 Microchip Technology Inc.
4.8.19
--CHECKSUM: Calculate a Checksum
This option will perform a checksum over the address range specified and store the 
result at the destination address specified. The general form of this option is as follows.
-CHECKSUM=start-end@destination[,offset=][,width=w][,code=c][,algorith
m=a
Additional specifications are appended as a comma-separated list to this option. Such 
specifications are:
width=n selects the width of the checksum result in bytes. A negative width will store
the result in little-endian byte order. Result widths from one to four bytes are
permitted.
offset=nnnn specifies an initial value or offset to be added to this checksum.
algorithm=n select one of the checksum algorithms implemented in HEXMATE. The
selectable algorithms are described in Table 8-9.
code=nn is a hexadecimal code that will trail each byte in the checksum result. This
can allow each byte of the checksum result to be embedded within an
instruction.
The startend and destination attributes are, by default, hexadecimal constants. 
If an accompanying --FILL option has not been specified, unused locations within the 
specified address range will be filled with FFFh for baseline devices, 3FFFh for 
mid-range devices, or FFFF for PIC18 devices. This is to remove any unknown values 
from the equation and ensure the accuracy of the checksum result.
For example:
--checksum=800-fff@20,width=1,algorithm=8
will calculate a 1 byte checksum from address 0x800 to 0xfff and store this at address 
0x20. Fletcher’s algorithm will be used. See Section 8.6.1.5 “-CK”.
The checksum calculations are performed by the HEXMATE application. The informa-
tion in this driver option is passed to the HEXMATE application when it is executed.
4.8.20
--CHIP: Define Device
This option must be used to specify the target device, or device, for the compilation. 
This is the only compiler option that is mandatory when compiling code.
To see a list of supported devices that can be used with this option, use the --CHIP-
INFO
4.8.21
--CHIPINFO: Display List of Supported Devices
The --CHIPINFO option displays a list of devices the compiler supports. The names 
listed are those chips defined in the chipinfo file and which may be used with the 
--CHIP
 option.
Compiler execution will terminate after this list has been printed.