3 Command-line Driver

The MPLAB XC8 C Compiler command-line driver, xc8-cc, can be invoked to perform all aspects of compilation, including C code generation, assembly and link steps. Its use is the recommended way to invoke the compiler, as it hides the complexity of all the internal applications and provides a consistent interface for all compilation steps. Even if an IDE is used to assist with compilation, the IDE will ultimately call xc8-cc.

If you are building a legacy project or would prefer to use the old command-line driver you may instead run the avr-gcc driver application and use appropriate command-line options for that driver. Those options may differ to those described in this guide.

This chapter describes the steps that the driver takes during compilation, the files that the driver can accept and produce, as well as the command-line options that control the compiler’s operation.