25.4.1 Generic Header File
A single header file <xc.h>
must be used to declare all compiler- and
device-specific types and SFRs. You must include this file into every module to
conform with the CCI. Some CCI definitions depend on this header being seen.
Example
The following shows this header file being included, thus allowing conformance with the
CCI, as well as allowing access to
SFRs.
#include <xc.h>
Differences
Although device-specific headers are shipped with the compilers, always include the
top-level <xc.h>
header.
Early compilers for 8-bit PIC devices used <htc.h>
as the
equivalent header. Other compilers used a variety of device-related headers to do the
same job.
Migration to the CCI
Change for example:
#include <p32xxxx.h>
#include <p30fxxxx.h>
#include <pic16lf18324.h> /* or */
#include "p30f6014.h"
to:#include <xc.h>