Cannot upload to Adafruit Feather M0 using JLink

The sections of the .elf file are only shown in a verbose build (project tasks → Advanced → Verbose Build).

There are other topics in this forum about JLink + Feather M0 debugging that also come to the conclusion that the bootloader stands in the way (Problems starting debug session with jlink on feather M0 - #11 by prototypicalpro), but to get to the “my code may not execute because the load address is not 0x0 and the bootloader might be gone” can only be gotten to with general knowledge about bootloading, flash layout and knowing that one’s board does have a bootloader. Adafruit has a few pages on this here and here.

This blog post and this blog post are good for explaining memory layout and bootloader basics (which isn’t so important after all other than realizing that the bootloader must go / load address must be fixed to 0). We get the “0x0 is the address at which the MCU first executes code / loads the vector table” from our target microcontroller’s datasheet, aka, Atmel SAMD21G18 in your case, from the vendor. Chapter 9, “Product Mapping” is the relevant one here.