Oh no that’s actually helpful thank you. I was thinking there was going to be some standard
SWD commands or something I’d need to learn. Looks like this OpenOCD library for Raspberry Pi can do it. I’ll just need to learn how OpenOCD does the flashing process.