3.1 Single-step Assembly
Assembly of one or more source files can be performed in just one step using the
pic-as
driver.
The following command will build both the assembly source files, passing these files to the appropriate internal applications, then link the generated code to form the final output.
pic-as -mcpu=16F877A main.S mdef.s
The driver will compile all source files, regardless of whether they have changed since the last build. Development environments (such as MPLAB® X IDE) and make utilities must be employed to achieve incremental builds (see 3.2 Multi-step Assembly).
Unless otherwise specified, a HEX file and ELF file are produced as the final
output. The intermediate files remain after compilation has completed, but most other
temporary files are deleted, unless you use the -save-temps
option (see
3.4.28 Save-temps Option) which
preserves all generated files. Note that some generated files can be in a different
directory than your project source files (see also 3.4.27 O: Specify Output File).