5.7.2.5 S: Compile To Assembly

The -S option is used to generate an assembly file for each source file listed on the command line.

When this option is used, the compilation sequence will terminate early, leaving behind assembly files with the same basename as the corresponding source file and with a .s extension.

For example, the command:

xc32-gcc -mprocessor=ATSAME70N20B -S test.c io.c

will produce two assembly file called test.s and io.s, which contain the assembly code generated from their corresponding source files.

This option might be useful for checking assembly code output by the compiler without the distraction of line number and opcode information that will be present in an assembly list file. The assembly files can also be used as the basis for your own assembly coding.