Microchip Technology SW006021-1N Manuel D’Utilisation
Utilities
2012 Microchip Technology Inc.
DS52053B-page 297
8.4
CREF
The cross reference list utility, CREF, is used to format raw cross-reference information
produced by the compiler or the assembler into a sorted listing.
produced by the compiler or the assembler into a sorted listing.
A raw cross-reference file is produced with the --CR command-line driver option. The
assembler will generate a raw cross-reference file with a -C assembler option or a
XREF
assembler will generate a raw cross-reference file with a -C assembler option or a
XREF
control line.
The general form of the CREF command is:
cref [options] files
where options is zero or more options as described below and files is one or more
raw cross-reference files.
raw cross-reference files.
CREF
will accept wildcard filenames and I/O redirection. Long command lines may be
supplied by invoking CREF with no arguments and typing the command line in response
to the cref> prompt. A backslash at the end of the line will be interpreted to mean that
more command lines follow.
to the cref> prompt. A backslash at the end of the line will be interpreted to mean that
more command lines follow.
CREF
takes the options listed in Section Table 8-4: “CREF Command-line Options”.
Each option is described in more detail in the following sections.
8.4.1
-Fprefix
It is often desired to exclude from the cross-reference listing any symbols defined in a
system header file, e.g., <stdio.h>. The -F option allows specification of a path
name prefix that will be used to exclude any symbols defined in a file whose path name
begins with that prefix. For example, -F\ will exclude any symbols from all files with a
path name starting with \.
system header file, e.g., <stdio.h>. The -F option allows specification of a path
name prefix that will be used to exclude any symbols defined in a file whose path name
begins with that prefix. For example, -F\ will exclude any symbols from all files with a
path name starting with \.
8.4.2
-Hheading
The -H option takes a string as an argument which will be used as a header in the list-
ing. The default heading is the name of the first raw cross-ref information file specified.
ing. The default heading is the name of the first raw cross-ref information file specified.
8.4.3
-Llen
Specify the length of the paper on which the listing is to be produced, e.g., if the listing
is to be printed on 55 line paper you would use a -L55 option. The default is 66 lines.
is to be printed on 55 line paper you would use a -L55 option. The default is 66 lines.
TABLE 8-4:
CREF COMMAND-LINE OPTIONS
Option
Meaning
-F
prefix
Exclude symbols from files with a pathname
or filename starting with prefix
or filename starting with prefix
-H
heading
Specify a heading for the listing file
-L
len
Specify the page length for the listing file
-O
outfile
Specify the name of the listing file
-P
width
Set the listing width
-S
stoplist
Read file stoplist and ignore any symbols
listed.
listed.
-X
prefix
Exclude any symbols starting with prefix
--EDF
Specify message file location
--EMAX
Specify maximum number of errors
--MSGDISABLE
Specify disabled messages
--VER
Print version number and stop