I'm tring to program the ATMega 16U2 device on an Uno R3 with the MIDI USB firmware; I'm using avrdude to program the 16U2 via the ICSP header using an Arduino Nano configured as an ISP device. Avrdude is throwing errors indicating it can't sync with the target, but I'm not sure where I'm going wrong. The command I'm using is:
avrdude -p at90usb162 -F -P COM7 -c avrisp -U flash:w:dualMoco.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m
COM7 is the virtual port that my arduino ISP appears as; I'm using at90usb162 to identify the 16U2, based on my research this appears to be the correct target.
The error is avrdude: stk500_getsync(): not in sync: resp=0x00
Any suggestions please?