17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

#ID "filename"<br />

#ID CHECKSUM<br />

Elements:<br />

Purpose:<br />

Number 16 is a 16 bit number, number is a 4 bit number, filename is any valid<br />

PC filename and checksum is a keyword.<br />

This directive defines the ID word to be programmed into the part. This directive<br />

does not affect the compilation but the information is put in the output file.<br />

The first syntax will take a 16 -bit number and put one nibble in each of the four ID<br />

words in the traditional manner. The second syntax specifies the exact value to be<br />

used in each of the four ID words .<br />

When a filename is specified the ID is read from the file. The format must be<br />

simple text with a CR/LF at the end. The keyword CHECKSUM indicates the<br />

device checksum should be saved as the ID.<br />

Examples:<br />

Example Files:<br />

Also See:<br />

#id 0x1234<br />

#id "serial.num"<br />

#id CHECKSUM<br />

ex_cust.c<br />

None<br />

#ifdef #ifndef #else #elif #endif<br />

Syntax:<br />

#IFDEF id<br />

code<br />

#ELIF<br />

code<br />

#ELSE<br />

code<br />

#ENDIF<br />

#IFNDEF id<br />

code<br />

#ELIF<br />

code<br />

#ELSE<br />

code<br />

#ENDIF<br />

Elements:<br />

Purpose:<br />

id is a preprocessor identifier, code is valid C source code.<br />

This directive acts much like the #IF except that the preprocessor simply checks<br />

108

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!