OpenOCD ATSAMD51 support and Atmel ICE config

Hello, I’m trying to program a SAMD51 using an ATMEL ICE (USB to SWD).

Unless I’m mistaken OpenOCD seems to lack support for this micro as the at91samdxx.cfg file is for cortex M0, not M4 files.

I’ve found the following tutorials that configure OpenOCD for a SAMD21, but I’m unsure if in my case the programming interface should be the CMSIS (like the tutorials) or the Jlink one (where the adapter is listed here in the debug adapter HW page) and more importantly how to go about building the.cfg file for this series of micros if it is not available in a version past the 0.9.0 I am on.

Config file tutorial:

Config file guidelines (section 6.3):

http://openocd.org/doc/html/Config-File-Guidelines.html

Adapter:

http://openocd.org/doc/html/Debug-Adapt … r-Hardware

http://openocd.org/doc/html/Debug-Adapt … figuration

https://www.digikey.com/product-detail/ … ND/4753379

Micro:

http://ww1.microchip.com/downloads/en/D … 01507A.pdf

SAMD21 tutorials:

http://omzlo.com/articles/programming-t … -(updated)

https://vk5tu.livejournal.com/56648.html