MEGA2560 Flashing Via Serial0, Serial1 and Serial2

I have a custom MEGA2560 board that I designed with 3 active USB ports connected to TX0/RX0 to TX2/RX2 (Serial1, 2, and 3). I would like to be able to independently flash the uC via AVRDUDE running on 3 different Linux based computers - each connected to one of 3 USB ports designed on the PCB. By design, AVRDUDE will run execute and flash the uC on the first Linux box with an available USB port.
I'm currently using the standard Arduino STK500 bootloader. I found versions of the bootloader binary setup for flashing via TX0/RX0, TX1/RX1 or TX2/RX2. However you select a specific port, the bootloader only works with that port via AVRDUDE. I am using 3 FTDI232 USB to UARTs for the three independent USB ports. Each of the DTS lines are connected through a 100 nf cap then joined to the MEGA2560 reset pin. Currently I'm using the default bootloader I can only flash the uC via USB0 or TX0/RX0 and it works as expected. For redundancy purposes, being able to flash from all 3 Linux PC sources would be ideal.
Has anyone encountered a special boot loader or solution around this problem?

None that I know of.
In theory, it might not be difficult to convert optiboot to do this.
Although it might be subject to picking the wrong port if it happened to have traffic.

westfw - thanks for the quick reply.

I have total control of the data flow from all three sources. A firmware update (uC flash) would by default only happen on Linux PC1 via Tx0/Rx0. If by chance Linux PC1 died or went off-line, a manual execution of AVRDUDE would occur on Linux PC2 or PC3 via Tx1/Rx1 and Tx2/Rx2 respectively.

Regardless, I appreciate your reply. Thank you.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.