avr-as understands the same -mmcu= options as avr-gcc. By default, avr2 is assumed, but this can be altered by using the appropriate .arch pseudo-instruction inside the assembler source file.

  • -mall-opcodes

Turns off opcode checking for the actual MCU type, and allows any possible AVR opcode to be assembled.

  • -mno-skip-bug

Don't emit a warning when trying to skip a 2-word instruction with a CPSE/SBIC/SBIS/SBRC/SBRS instruction. Early AVR devices suffered from a hardware bug where these instructions could not be properly skipped.

  • -mno-wrap

For RJMP/RCALL instructions, don't allow the target address to wrap around for devices that have more than 8 KB of memory.

  • --gstabs

Generate .stabs debugging symbols for assembler source lines. This enables avr-gdb to trace through assembler source files. This option must not be used when assembling sources that have been generated by the C compiler; these files already contain the appropriate line number information from the C source files.

  • -a[cdhlmns=file]

Turn on the assembler listing. The sub-options are:

  • c omit false conditionals

  • d omit debugging directives

  • h include high-level source

  • l include assembly

  • m include macro expansions

  • n omit forms processing

  • s include symbols

  • =file set the name of the listing file

The various sub-options can be combined into a single -a option list; =file must be the last one in that case.