Download CCS C Compiler Manual

Transcript
PreProcessor
Some fuses are set by the compiler based on other compiler directives. For example, the oscillator
fuses are set up by the #USE delay directive. The debug, No debug and ICSPN Fuses are set by the
#DEVICE ICD=directive.
Some processors allow different levels for certain fuses. To access these levels, assign a value to the
fuse. For example, on the 18F452, the fuse PROTECT=6 would place the value 6 into CONFIG5L,
protecting code blocks 0 and 3.
When linking multiple compilation units be aware this directive applies to the final object file. Later files
in the import list may reverse settings in previous files.
To eliminate all fuses in the output files use:
#FUSES none
To manually set the fuses in the output files use:
#FUSES 1 = 0xC200 // sets config word 1 to 0xC200
Examples:
#fuses
Example
Files:
ex_sqw.c
Also See:
None
HS,NOWDT
#hexcomment
Syntax:
#HEXCOMMENT text comment for the top of the hex file
#HEXCOMMENT\ text comment for the end of the hex file
Elements:
None
Purpose:
Puts a comment in the hex file
Some programmers (MPLAB in particular) do not like comments at the top of the hex file.
Examples:
#HEXCOMMENT Version 3.1 – requires 20MHz crystal
Example
Files:
None
Also See:
None
91