unfortunately that did not work. I did find
C:\Users<username>\AppData\Local\Arduino15
I put the AVR folder in there with the boards.txt file but flashing a sketch still gives me a leonardo in usb games setup panel.
However, I did find the default boards.txt file in here:
C:\Users\Stefan\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5
In that file are MANY arduino definitions. The one for leonardo looks like this
leonardo.name=Arduino Leonardo
leonardo.vid.0=0x2341
leonardo.pid.0=0x0036
leonardo.vid.1=0x2341
leonardo.pid.1=0x8036
leonardo.vid.2=0x2A03
leonardo.pid.2=0x0036
leonardo.vid.3=0x2A03
leonardo.pid.3=0x8036
leonardo.upload_port.0.vid=0x2341
leonardo.upload_port.0.pid=0x0036
leonardo.upload_port.1.vid=0x2341
leonardo.upload_port.1.pid=0x8036
leonardo.upload_port.2.vid=0x2A03
leonardo.upload_port.2.pid=0x0036
leonardo.upload_port.3.vid=0x2A03
leonardo.upload_port.3.pid=0x8036
leonardo.upload_port.4.board=leonardo
leonardo.upload.tool=avrdude
leonardo.upload.tool.default=avrdude
leonardo.upload.tool.network=arduino_ota
leonardo.upload.protocol=avr109
leonardo.upload.maximum_size=28672
leonardo.upload.maximum_data_size=2560
leonardo.upload.speed=57600
leonardo.upload.disable_flushing=true
leonardo.upload.use_1200bps_touch=true
leonardo.upload.wait_for_upload_port=true
leonardo.bootloader.tool=avrdude
leonardo.bootloader.tool.default=avrdude
leonardo.bootloader.low_fuses=0xff
leonardo.bootloader.high_fuses=0xd8
leonardo.bootloader.extended_fuses=0xcb
leonardo.bootloader.file=caterina/Caterina-Leonardo.hex
leonardo.bootloader.unlock_bits=0x3F
leonardo.bootloader.lock_bits=0x2F
leonardo.build.mcu=atmega32u4
leonardo.build.f_cpu=16000000L
leonardo.build.vid=0x2341
leonardo.build.pid=0x8036
leonardo.build.usb_product="Arduino Leonardo"
leonardo.build.board=AVR_LEONARDO
leonardo.build.core=arduino
leonardo.build.variant=leonardo
leonardo.build.extra_flags={build.usb_flags}
It is quite a bit longer than mine.
First, it has 4 vid,pid sets. Why?
Then it offers 4 different upload ports.
So I first I just changed leonardo.name=ProMicroButtonsDials
leonardo.build.usb_product="ProMicroButtonsDials"
that did nothing.
Then I changed every instance of 'leonardo.' to
'leonardoProMicroFlight.' This gave me
leonardoProMicroFlight.name=ProMicroButtonsDials
leonardoProMicroFlight.vid.0=0x2341
leonardoProMicroFlight.pid.0=0x0036
leonardoProMicroFlight.vid.1=0x2341
leonardoProMicroFlight.pid.1=0x8036
leonardoProMicroFlight.vid.2=0x2A03
leonardoProMicroFlight.pid.2=0x0036
leonardoProMicroFlight.vid.3=0x2A03
leonardoProMicroFlight.pid.3=0x8036
leonardoProMicroFlight.upload_port.0.vid=0x2341
leonardoProMicroFlight.upload_port.0.pid=0x0036
leonardoProMicroFlight.upload_port.1.vid=0x2341
leonardoProMicroFlight.upload_port.1.pid=0x8036
leonardoProMicroFlight.upload_port.2.vid=0x2A03
leonardoProMicroFlight.upload_port.2.pid=0x0036
leonardoProMicroFlight.upload_port.3.vid=0x2A03
leonardoProMicroFlight.upload_port.3.pid=0x8036
leonardoProMicroFlight.upload_port.4.board=leonardo
leonardoProMicroFlight.upload.tool=avrdude
leonardoProMicroFlight.upload.tool.default=avrdude
leonardoProMicroFlight.upload.tool.network=arduino_ota
leonardoProMicroFlight.upload.protocol=avr109
leonardoProMicroFlight.upload.maximum_size=28672
leonardoProMicroFlight.upload.maximum_data_size=2560
leonardoProMicroFlight.upload.speed=57600
leonardoProMicroFlight.upload.disable_flushing=true
leonardoProMicroFlight.upload.use_1200bps_touch=true
leonardoProMicroFlight.upload.wait_for_upload_port=true
leonardoProMicroFlight.bootloader.tool=avrdude
leonardoProMicroFlight.bootloader.tool.default=avrdude
leonardoProMicroFlight.bootloader.low_fuses=0xff
leonardoProMicroFlight.bootloader.high_fuses=0xd8
leonardoProMicroFlight.bootloader.extended_fuses=0xcb
leonardoProMicroFlight.bootloader.file=caterina/Caterina-leonardoProMicroFlight.hex
leonardoProMicroFlight.bootloader.unlock_bits=0x3F
leonardoProMicroFlight.bootloader.lock_bits=0x2F
leonardoProMicroFlight.build.mcu=atmega32u4
leonardoProMicroFlight.build.f_cpu=16000000L
leonardoProMicroFlight.build.vid=0x2341
leonardoProMicroFlight.build.pid=0x8036
leonardoProMicroFlight.build.usb_product="ProMicroButtonsDials"
leonardoProMicroFlight.build.board=AVR_LEONARDO
leonardoProMicroFlight.build.core=arduino
leonardoProMicroFlight.build.variant=leonardo
leonardoProMicroFlight.build.extra_flags={build.usb_flags}
and uploading that gave me this error:
Error resolving FQBN: board
Error compiling for board Arduino Leonardo.
I guess FQBN is short for fully qualified board name?
I unplugged the usb, closed arduino IDE,reopened arduino IDE and plugged the board in. (in case the IDE is using a cached version of something) and now the upload resulted in the board not even showing up under a port! Unplugging and replugging USB results in a 'USB device not recognized' error dialog in windows.
A new device appears under USB Serial bus controllers in device manager as 'unknown usb device' with a yellow caution triangle. The properties dialog of it says
Windows has stopped this device because it has reported problems. (Code 43)
A request for the USB device descriptor failed.
Trying to upload a blank sketch doesnt work obviously.
So I tried to load a blank sketch after hardware resetting it (RST->GND still allows the arduino to go into bootloader mode and show up on port 4). Now I get this error
An error occurred while uploading the sketch
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_recv(): read error: The device does not recognize the command.
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_drain(): read error: The device does not recognize the command.
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_recv(): read error: The device does not recognize the command.
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: The device does not recognize the command.
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "�"; type = �
Software Version = i.
yes, I made sure to restore the default boards.txt file before doing this. But that error looks like a timing error. As anyone knows, trying to upload a sketch and manually getting a board in its receptive state is tricky. Finally, I achieved this and I have a functional board again. But I still cannot rename it. Obviously I am missing something here.