Upload arduino .hex via MicroPython SPI interface, MicroPython language

I'm interested in doing this:
Take a MicroPython board such as ESP32 dev board running MicroPython, connect arduino to ESP32 via SPI pins (proper level shifting), run a MicroPython script to upload .hex to arduino.

I'll ask the same question on MicroPython forum if I get no information here since we are half the question, the arduino .hex SPI upload half. I've used raspberry pi avrdude spi programmer to 100% satisfaction. It could be a starting point (in C/C++), or Nick Gammon's hex uploader code in Arduino ecosystem C/C++.

Thanks!

Thanks westfw. After a brief look, this seems to be using rpi to program avr. I'm actually doing that but with a version of avrdude that uses pi's SPI pins:
[
](http://" https://forum.arduino.cc/index.php?topic=632792.msg4284288#msg4284288")
[https://forum.arduino.cc/index.php?topic=632792.msg4284288#msg4284288](http://" https://forum.arduino.cc/index.php?topic=632792.msg4284288#msg4284288")

It works very well. I use N-MOSFET bidirectional shifters for inter connection. Plan on using 32u4's spi for other stuff so it's nice to have the bidirectional shifters remove contention.

I'll give the sparkfun repo a closer look. Maybe I can adapt their code, if it is in python, to MicroPython platform.