I am trying to figure out what the sequence of STK500 commands is to program an Arduino.
I would like to have a hex file stored on an SD card and have a processor read the hex file and burn it to an Arduino using the standard bootloader.
I have had a look through the commands in the protocol: http://www.atmel.com/Images/doc2525.pdf
And I have seen a Python implementation of the programming side: https://translate.google.com/translate?hl=en&sl=es&tl=en&u=http%3A%2F%2Fwww.sistemasorp.es%2F2014%2F11%2F11%2Fprogramando-un-arduino-remotamente-con-el-modulo-esp8266%2F
But I don't have a clear idea of what the minimum required message flow is to program the Arduino.
If someone could point me towards some appropriate documentation, or could explain to me what is required to implement a programmer that would be great.
p.s - Also, I'd be interested in doing this for the SAMD21 bootloader that is on an Arduino Zero. Any info that would help me get started would be appreciated.