I'm on a fedora distribution trying to program a SAMD51. I have the .elf .bin and .hex (plus an intel.hex) to program the device with an Atmel ICE, USB to SWD.
As it stands OpenOCD seems to lack support for this micro. I've found the following tutorials that configure OpenOCD for a SAMD21, but I'm unsure if the programming interface should be the CMSIS or the Jlink one and how to build the second .cfg file for this series of micros.
I found this for E54 and possibly D51 but it needs to be switched from a "new" version of dap to the old one I have access to: