I want to be able to upload a hex file to an Atmega2560 from a Uno with attached SD Card. Since the target is a 2560 I have to use v2 of the protocol. Additionally, I want to be able to upload the code through the bootloader on the 2560 not over ICSP (SPI).
So I've found two almost complete solutions to solve my problem:
It will program an Atmega2560 using STK500v2. However, the problem is that it uses SPI not normal serial.
It does upload over regular serial, but does not use the v2 protocol so it won't program a 2560
So the very basic question is uploading using the bootloader and over SPI versus serial almost the same thing or significantly different as far as the STK500 protocol is concerned? I know the the reset sequence is somewhat different.
Right now I'm working on changing Nick Gammon's code from SPI to serial. Any thoughts would be helpful. Thanks.