What is OpenOCD? Why Raspberry Pi and not ROCK64 or Nvidia Jetson Nano?
OpenOCD (Open On-Chip Debugger) is the open-source tool that we use to flash and debug PineTime.
OpenOCD runs on our Raspberry Pi and connects via GPIO Pins to the SWD (Serial Wire Debug) port of PineTime to perform flashing and debugging.
Other single-board computers like ROCK64 and Nvidia Jetson Nano don't run on the Broadcom microcontroller. So this OpenOCD configuration won't work.
OpenOCD works reliably on Raspberry Pi when there are no background tasks running, because OpenOCD uses timing-sensitive Bit-Banging to send data over the GPIO Pins. I recommend booting Raspberry Pi in Console mode and connecting to Pi via ssh to perform flashing...
Disconnect the HDMI cable from the Pi while flashing, because updating the display requires computing power too.
Is it possible to implement the SWD protocol with Raspberry Pi's reliable Bidirectional SPI interface, instead of unreliable Bit-Banging GPIO?
Work in progress...