Now I would like to program the USB chip in a similar way. First, is this possible? And second, do I have to be concerned about the fuse settings like for the regular bootloader?
It is possible to flash/erase/program/etc the small USB chip. You have to download a free application called Atmel FLIP to do so. Once ready, perform the following actions. I'm doing this from memory so please bear with me.
Plug UNO into computer
Quickly touch the USB chip's ICSP reset and ground pins together
Go to device manager
Find any unknown devices
Right-click on the device and select "Update driver software"
Select "browse" in the new window
Navigate to where you installed FLIP (mine is Program Files (86)/Atmel/Flip 3.4.7/usb)
Make sure to select the folder, dont go into the folder
Install the drivers
The device should appear as "Atmega16u2" in something called "linusb-win32" or something
Go back to FLIP
Click on the chip icon on the top left and select ATmega16u2 from the menu
Go to the USB cable option and select USB
Click "open port" in the small popup window
Go to File->load HEX and load the UNO hex file with the shorter title from the C:\Program Files (x86)\Arduino\hardware\arduino\avr\firmwares\atmegaxxu2 directory (your directory may differ)
On the left of the main FLIP application, make sure the boxes for erase, program, and verify are checked
Click run underneath the checkboxes
And you should be done. Unplug the UNO and back in and see if it registers as a COM port in device manager and in the Tools->Port menu of the IDE.
Let me know of any questions or if I made a mistake somewhere
Thank you for the detailed response. I will try it.
I'm thinking, however, that there must be a process to program the USB chip that has fewer steps, since Arduinos are made by the thousands and have to be programmed before shipping.
Atmel Studio has a simple way to program a .hex file into a device, and it also allows setting the proper fuse values. I used this method for the 328P, and it worked the first time. I erased the 328P flash, verified that it no longer worked, then re-programmed it, and it worked like a charm.
I will pursue this further, and post a procedure if I figure it out.
You can program the 32u4 using the "nearby" ISP header, assuming that it is populated, or that you can add the pins.
Any ISP programmer will work, including the "Arduino as ISP" sketch.
Bos1714's method should work if you don't have a programmer of any kind.
Arduinos are made by the thousands and have to be programmed before shipping.
Arduino probably buys the chips pre-programmed.
But note that most of the other method steps are "install software and drivers." Once you've done that, it'd be pretty much
Thank you for your reply. I have an ATMEL ICE programmer with the appropriate 6 pin connector. I already used it to erase the 328P bootloader, and then reload it. It worked fine.
For the USB chip, I would like to do the same, and as you have stated, this appears to be doable. But I had to set fuses to certain values when I programmed the 328P. Do you know if fuses need to be set when programming the USB chip?