I would like to generate the usb2serial code on the UNO 16u2, for myself . Before jumping into the dark, I would like to take small steps. To this end, I have pulled the code from my UNO Rev3 using:
avrdude -p atmega16u2 -c usbasp -U flash:r:/tmp/flash-dump.hex:i
and compared it against the the distribution file:
Which matches - an encouraging first step, I thought! Next, I tried compiling the provided code at:
/usr/share/arduino-1.6.5/hardware/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial/ and /usr/share/arduino-1.6.5/hardware/arduino/avr/firmwares/atmegaxxu2/arduino-usbdfu/.
Again, that seems to compile without any errors.
However, and this is my question, the compiled binarys do not match the distribution .hex files.
Can you offer an suggestions on how I generate for myself the exact same code that is on my UNO before I start making changes?
Best regards, Martin