Flashing an RP2040 board (tested with a Waveshare RP2040-Zero) from a Raspberry Pi over SSH using arduino-cli. Written for a first-time setup. Notes from actual trial and error.
Things that will differ on your machine are marked like <this>. Pay attention to usernames, serial ports, and file paths: do not copy-paste those blindly.
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh

