5 Command-line Driver

The MPLAB XC32 C Compiler command-line driver, xc32-gcc, 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 xc32-gcc.

If you are developing a project that contains C++ source code, an alternate driver called xc32-g++ is supplied and that will link in an alternate set of libraries. Its operation is similar to the xc32-gcc driver.

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.