MEGA and Leonardo - programming using alternative serials?

Hi,
Just wondering, is it possible to program Arduino MEGA/Leonardo using alternative serial port rather than the one assigned to the USB port? In some applications where I assign the 16u2/32u4 processor for HID emulation purposes, I might not be able to attach that port for uploading programs, but I'm not quite willing to use an ISP. Anyone knows a workaround? Do I really need to write a new bootloader for that? I do understand that the Leonardo is loaded with Atmel's standard AVR109 boot loader, which may be hard to hack around.

Thank you very much! :slight_smile:

You can override the serial port of the Mega.
Maybe the ATmega32u4 is preloaded with the ATmel bootloader, but the Leonardo is not. The Leonardo has the Arduino bootloader with the emulated hardware/software serial port via the usb. If you want to use pin 0 and 1 on the Leonardo, you need a new bootloader.

I don't know if someone has made bootloader via uart yet. I can't find it, but that bootloader would be almost the same as the bootloader for the Uno.