2.2 Assembler and Other Development Tools

The MPLAB XC32 Assembler translates hand-written assembly source files. In addition, the MPLAB XC32 C/C++ Compiler uses this assembler to produce object files for the linker.

Assembly source files can contain C preprocessor directives. Such files must use a .S (capital 'S') extension and will be preprocessed before being passed to the assembler. Source files containing pure assembler code can use the .s extension (lower case 's') and will not be preprocessed.

A relocatable object file is generated by the assembler for each assembly source file, which can then be placed into a library archive or linked with other relocatable object files and/or archives to create an executable file.

The figure below shows the assembler's role in the compilation process.

Figure 2-1. Assembler Execution in the Compilation Process