HI-TECH C
®
for PIC10/12/16 User’s Guide
DS51865B-page 18 2010 Microchip Technology Inc.
There is one list file produced for the entire C program, including C library files, and
which will be assigned the project name and extension .lst. One additional list file is
produced for each assembly source file compiled in the project.
The map file shows information relating to where objects were positioned in memory. It
is useful for confirming if user-defined linker options were correctly processed, and for
determining the exact placement of objects and functions. It also shows all the unused
memory areas in a device and memory fragmentation. See Section 5.4 “Map Files”
for complete information on the contents of this file.
There is one map file produced when you build a project, assuming the linker was exe-
cuted and ran to completion. The file will be assigned the project name and .map
extension.
2.6 COMPILER MESSAGES
All compiler applications, including the command-line driver, PICC, use textual mes-
sages to report feedback during the compilation process. A centralized messaging sys-
tem is used to produce the messages, which allows consistency during all stages of the
compilation process.
2.6.1 Messaging Overview
A message is referenced by a unique number which is passed to the messaging sys-
tem by the compiler application that needs to convey the information. The message
string corresponding to this number is obtained from Message Description Files (MDF),
which are stored in the dat directory in the compiler’s installation directory.
When a message is requested by a compiler application, its number is looked up in the
MDF that corresponds to the currently selected language. The language of messages
can be altered as discussed in Section 2.6.2 “Message Language”.
Once found, the alert system can read the message type and the string to be displayed
from the MDF. There are several different message types which are described in
Section 2.6.3 “Message Type” and the type can be overridden by the user, as
described in the same section.
The user is also able to set a threshold for warning message importance, so that only
those which the user considers significant will be displayed. In addition, messages with
a particular number can be disabled. A pragma can also be used to disable a particular
message number within specific lines of code. These methods are explained in
Section 2.6.5.1 “Disabling Messages”.
Provided the message is enabled and it is not a warning message whose level is below
the current warning threshold, the message string will be displayed.
In addition to the actual message string, there are several other pieces of information
that may be displayed, such as the message number, the name of the file for which the
message is applicable, the file’s line number and the application that issued the mes-
sage, etc.
If a message is an error, a counter is incremented. After a certain number of errors has
been reached, compilation of the current module will cease. The default number of
errors that will cause this termination can be adjusted by using the --ERRORS option,
see Section 2.7.28 “--ERRORS: Maximum Number of Errors”. This counter is reset
for each internal compiler application, thus specifying a maximum of five errors will
allow up to five errors from the parser, five from the code generator, five from the linker,
five from the driver, etc.
Although the information in the MDF can be modified with any text editor, this is not rec-
ommended. Message behavior should only be altered using the options and pragmas
described in the following sections.