The Compiler Applications

The main internal compiler applications and files are illustrated in Figure 4-1.

The large shaded box represents the compiler, which is controlled by the command line driver, xc8-cc. You might be satisfied just knowing that C source files (shown on the far left) are passed to the compiler and the resulting output files (shown here as a HEX and ELF debug file on the far right) are produced; however, internally there are many applications and temporary files being produced. An understanding of the internal operation of the compiler, while not necessary, does assist with using the tool.

The driver will call the required compiler applications when required. These applications are located in the compiler’s bin directories and are shown in the diagram as the smaller boxes inside the driver.

When compiling for the C99 standard, the Clang front end application performs the role of both the preprocessor and parser applications.

The temporary files produced by each application can also be seen in this diagram and are marked at the point in the compilation sequence where they are generated. The intermediate files for C source are shaded in red. Some of these temporary files remain after compilation has concluded. There are also driver options to request that the compilation sequence halt after execution of a particular application so that the output of that application remains in a file and can be examined.

Figure 1. Compiler Applications And Files

It is recommended that only the hexmate and archiver (xc8-ar) internal applications be executed directly. Their command-line options are described in Utilities.