Cannot rename pro micro

I followed this tutorial:

(which btw is even referenced by Heironimus, author of Joystick Library 2.0)

but the name of my pro micro does not change.
My boards.txt file is in the right place(Arduino folder->hardware folder->AVR folder), modified appropriately, and the sketch uploads fine. However, in the set up USB control panel the name remains arduino leonardo

In the properties page of the pro micro in device manager (under ports->properties-> details->hardware IDs) even the vid and pid have not changed.

My boards.txt file is below:

leonardoProMicroFlight.name=ProMicroButtonsDials
        
leonardoProMicroFlight.upload.tool=arduino:avrdude
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=arduino:avrdude
leonardoProMicroFlight.bootloader.low_fuses=0xff
leonardoProMicroFlight.bootloader.high_fuses=0xd8
leonardoProMicroFlight.bootloader.extended_fuses=0xcb
leonardoProMicroFlight.bootloader.file=caterina/Caterina-Leonardo.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.usb_manufacturer="skyPickle"
leonardoProMicroFlight.build.board=AVR_LEONARDO
leonardoProMicroFlight.build.core=arduino:arduino
leonardoProMicroFlight.build.variant=arduino:leonardo
leonardoProMicroFlight.build.extra_flags={build.usb_flags}

using arduino IDE 1.8.19

If you installed an AVR update you will be using the boards.txt file from: packages/arduino/hardware/avr/1.8.5/boards.txt instead of the one from the original install.

On a Mac that's in:
~/Library/Arduino15

I don't remember where it is on Windows.

It is here on Windows:

C:\Users\<username>\AppData\Local\Arduino15\

If looking for it with your file browser or command line, note that the folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".


It is here on Linux:

~/.arduino15/

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 :slight_smile: 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.

I apologize that I was not more clear in my previous reply. The path I mentioned:

C:\Users\<username>\AppData\Local\Arduino15\

Is only the root data file, equivalent to the ~/Library/Arduino15 macOS path mentioned by @johnwasser. As you discovered, the Arduino boards platforms are installed under subfolders of that path and the Arduino IDE will only recognize the files in those specific subfolders.

So you can delete the "AVR" folder you added. It won't do any technical harm, but it might cause you confusion at some distant time in the future after you forgot about adding it.

The reason is that Arduino has produced the board with multiple VID/PID pairs. They must define each of those in order that the Arduino IDE will do the convenience labeling of the port of the Leonardo under the Tools > Port menu.

That leaves the question of why they would use multiple VID/PID pairs rather than only one. I believe the reason for the 0x2341 vs 0x2A03 VID split is that some years back there was a schism in the Arduino company and a legal battle over who owned the Arduino trademark. Both companies (commonly referred to as "arduino.org" and "arduino.cc" after their respective websites) were manufacturing Leonardo boards, but the ".org" folks had purchased a different vendor ID from the USB Implementers Forum: 0x2A03 ("Dog Hunter AG").

As for why there is two PIDs for each of the two VIDs, the reason is that the Leonardo has a different VID/PID pair while the bootloader is running for a few seconds after the reset than it does when the sketch application is running. You can see it switch from one to the other if you open the Windows Device Manager and then press the reset button on your Leonardo.

Same reason as I explained above. The upload_port properties are the new system used by Arduino IDE 2.x, which accounts for the fact that boards might have any arbitrary type of port (e.g., network port), which has its own unique form of identifier, rather than only ever having a USB-based CDC serial port which can be identified via the USB VID/PID system. The old leonardo.vid.n/leonardo.pid.n properties are left in place to provide backwards compatibility for older versions of the Arduino IDE and other development tools which have not updated to the new properties system.

Did you restart the Arduino IDE after doing that? The Arduino IDE only reads the boards.txt file on startup so you must restart the IDE before the changes you make to the file will take effect.

Did you upload a sketch to your Leonardo? The product name is programmed when you upload the sketch, so if the board is still running a sketch from before you made the change, it will have no effect.

Even after that, I'm not sure where this name is used. It doesn't change anything for me in Device Manager that I can see. I seem to remember that the name shown in Device Manager is defined in the driver installed on your PC.

That won't have any visible effect. That leonardo is only an arbitrary identifier the Arduino development software uses internally for the Leonardo board definition.

You need to select the board again from the Tools > Board menu because the IDE is still using the old leonardo board ID.

You got it!

The board ID is part of the FQBN. Previously, the FQBN for the Leonardo was arduino:avr:leonardo. After the change you made, it is arduino:avr:leonardoProMicroFlight.

Unfortunately I don't know much about this subject. I'm sure one of the other forum members does though.

so this is my boards.txt file

ProMicro.name=ProMicroButtonsDials
ProMicro.vid.0=0x2341
ProMicro.pid.0=0x0036
ProMicro.vid.1=0x2341
ProMicro.pid.1=0x8036
ProMicro.vid.2=0x2A03
ProMicro.pid.2=0x0036
ProMicro.vid.3=0x2A03
ProMicro.pid.3=0x8036
ProMicro.upload_port.0.vid=0x2341
ProMicro.upload_port.0.pid=0x0036
ProMicro.upload_port.1.vid=0x2341
ProMicro.upload_port.1.pid=0x8036
ProMicro.upload_port.2.vid=0x2A03
ProMicro.upload_port.2.pid=0x0036
ProMicro.upload_port.3.vid=0x2A03
ProMicro.upload_port.3.pid=0x8036
ProMicro.upload_port.4.board=leonardo

ProMicro.upload.tool=avrdude
ProMicro.upload.tool.default=avrdude
ProMicro.upload.tool.network=arduino_ota
ProMicro.upload.protocol=avr109
ProMicro.upload.maximum_size=28672
ProMicro.upload.maximum_data_size=2560
ProMicro.upload.speed=57600
ProMicro.upload.disable_flushing=true
ProMicro.upload.use_1200bps_touch=true
ProMicro.upload.wait_for_upload_port=true

ProMicro.bootloader.tool=avrdude
ProMicro.bootloader.tool.default=avrdude
ProMicro.bootloader.low_fuses=0xff
ProMicro.bootloader.high_fuses=0xd8
ProMicro.bootloader.extended_fuses=0xcb
ProMicro.bootloader.file=caterina/Caterina-Leonardo.hex
ProMicro.bootloader.unlock_bits=0x3F
ProMicro.bootloader.lock_bits=0x2F

ProMicro.build.mcu=atmega32u4
ProMicro.build.f_cpu=16000000L
ProMicro.build.vid=0x2341
ProMicro.build.pid=0x8036
ProMicro.build.usb_product="ProMicroButtonsDials"
ProMicro.build.board=AVR_LEONARDO
ProMicro.build.core=arduino
ProMicro.build.variant=leonardo
ProMicro.build.extra_flags={build.usb_flags}

I unplugged the pro micro, quit arduino IDE, and deleted all the hidden ports. I restart Arduino IDE and under board, there is no longer a leonardo rather it is 'ProMicroButtonsDials'. I flashed a working sketch which includes the Heironimus library. Closed the IDE, unplugged the pro micro.

Replugged the pro micro but it still appears as Arduino Leonardo under ports as well as USB game controllers. Has anyone successfuly renamed their promicro with IDE 1.8.19?
I plug in the pro micro and it still shows up as an Arduino Leonardo.
I changed the PID to 8037 in the boards.txt.
Reflashed the same sketch.
Now it shows up in device manager as an Arduino Micro. But it does not show up under usb controllers. I unplugged it, replugged, no joy.

Changed the PID back to 8036, reflashed, and now it's an Arduino Leonardo in device manager and it shows up as a usb controller.

So is the only thing that matters the PID?
Has anyone successfully renamed their pro micro recently using the arduino IDE 1.8.19?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.