as
can only generate ELF output, but you can convert an ELF binary to another format using objcopy
:
objcopy -O binary mybinary.elf mybinary.bin
It supports a number of other formats as well as "binary". In particular, it supports "ihex" to produce .hex
files, which some microcontroller programming tools may require.