How to burn a new firmware on a board from another board ?

Hi,

I have 2 boards (one with Atmega2560 and another one with atmega328). These 2 boards communicate through a SPI bus.

Atmega2560 is on the main board (master board); atmega328 is on the slave board, and there is NO BOOTLOADER on it.

So, how can I burn a new firmware on my atmega328 through the SPI bus from my atmega2560 ? This new firmware is stored on external SPI Flash on the main board.

Thank you so much,

Anthony

Is there a reason you can't do it the normal way (by using Arduino as ISP sketch on the mega, and burning bootloader from computer)?

People have certainly done things like that, to make a stand-alone ISP programmer - you can find more info on the web, but unless you need to be able to do it without a computer, that's probably more effort than it's worth.