go-flash
lets you flash microcontrollers (currently only STM32 chips) over
UART, using GPIO pins to control boot0/boot1/pwr lines.
go get github.com/synthread/go-flash
See https://pkg.go.dev/github.com/synthread/go-flash/flash for some docs on how to use it.