How to Flash Arduino Program through "Micro sd card" without using Arduino IDE

jjuni:
Does anyone know how to do this with an ARM processor, rather than AVR? I'm specifically looking M4 (SAMD51) on an Adafruit Feather M4.

Also, would prefer to do it using the SPI flash on the Feather board as a "pseudo" SD.

Ideas?

write SAMD51 version of this ArduinoOTA/src/InternalStorage.cpp at master · JAndrassy/ArduinoOTA · GitHub