I'm working on figuring this out, so this is my notes page for now. I haven't tested these instructions yet.
Feather M0 uses the ATSAMD21G18 processor, an ARM chip, which means using bossa to upload binaries instead of avrdude.
Debian packages:
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi bossa-cli openocd
Download "device family packs" from the Microchip Packs Repository and unzip them:
wget http://packs.download.atmel.com/Atmel.SAMD21_DFP.1.3.395.atpack wget http://packs.download.atmel.com/ARM.CMSIS.5.4.0.atpack unzip *.atpack
Compiling:
/path/to/arm/gcc/arm-none-eabi-gcc sampleProgram.c startup_samd21g18a.c system_samd21g18a.c -o sampleProgram.elf -D __SAMD21G18A__ -I include -I /path/to/CMSIS/Core/Include -T samd21g18a_flash.ld -mcpu=cortex-m0plus -mthumb -Os -nostdlib -Wl,--section-start=.text=0x2000
Flashing:
bossac -p /dev/ACM0 -e -w -v -R --offset=0x2000 blinky.bin
Useful threads: