Skip to content

Instantly share code, notes, and snippets.

@nebhead
Last active September 22, 2024 09:57
Show Gist options
  • Save nebhead/c92da8f1a8b476f7c36c032a0ac2592a to your computer and use it in GitHub Desktop.
Save nebhead/c92da8f1a8b476f7c36c032a0ac2592a to your computer and use it in GitHub Desktop.
Instructions for Adding Custom Naming for Arduino USB Device

The following is capturing instructions on how to add custom naming for an Arduino Leonardo (or generic pro-micro) for my Arcade Controller device. I wanted to have a simple record so that when I inevitably come back to this someday I can recall how I accomplished this. Reference was taken from the following YouTube video (https://youtu.be/hoCOq9Ngp44?t=1156) at approximately 19m16s.

WINDOWS Instructions:

Create a new set of folders: ~\Documents\Arduino\hardware\daemonbite\avr

Copy everything from C:\Program Files (x86)\Arduino\hardware\arduino\avr to this new folder.

Replace the boards.txt in the new folder with the following

boards.txt

leonardo.name=DaemonBite
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.tool=avrdude
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.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=0x8037
leonardo.build.usb_product="DaemonBite (Player 1)"
leonardo.build.board=AVR_LEONARDO
leonardo.build.core=arduino
leonardo.build.variant=leonardo
leonardo.build.extra_flags={build.usb_flags}

Edit the following lines to create custom board / USB naming:

leonardo.name=DaemonBite leonardo.build.usb_product="DaemonBite (Player 1)"

Ensure for each custom name you assign, you change the following line:

leonardo.build.pid=0x8037

In this case, I incremented the default Arduino Leonardo by 1, from 0x8036 to 0x8037 (player 1), 0x8038 (player 2).

Now when you launch the Arduino IDE, you should see the new board in the Tools > Boards menu.

Make sure everything compiles/builds correctly, then flash. That should be everything.

One future thing to try might be to add usb manufacturer because it will come up as (Arduino LLC with above).

leonardo.build.usb_manufacturer="Arcade"

Linux Instructions

Go to ~/.arduino15/packages/SparkFun/hardware/avr/1.1.13

Copy boards.txt to boards.txt.org

Modify below lines in boards.txt

################################################################################
################################## Pro Micro ###################################
################################################################################
promicro.name=DaemonBite

promicro.build.usb_manufacturer="DaemonBite"
promicro.build.usb_product="Arcade (P1)"
promicro.build.vid=0x1b5f

############################# Pro Micro 5V / 16MHz #############################

promicro.menu.cpu.16MHzatmega32U4.build.pid.0=0x9208
promicro.menu.cpu.16MHzatmega32U4.build.pid.1=0x9207
promicro.menu.cpu.16MHzatmega32U4.build.pid=0x9207
@TonyWhitley
Copy link

TonyWhitley commented Oct 28, 2023

Thanks for the magic charm that makes it work:
Ensure for each custom name you assign, you change the following line:
leonardo.build.pid=0x8037

@bailuWX
Copy link

bailuWX commented Apr 27, 2024

very nice , a new verson arduino should add a line :
leonardo.upload.tool.serial=avrdude
than it can work

@nbatch15
Copy link

anyone know how I would do this same thing with an esp32?

@calipee
Copy link

calipee commented May 20, 2024

For me the arduino directory was in C:\Users<USER>\AppData\Local\Arduino15\packages\arduino\hardware

@Sterminare
Copy link

very nice , a new verson arduino should add a line : leonardo.upload.tool.serial=avrdude than it can work

THANK YOU!!! Exactly what I needed in 2.2.1, when following a tutorial written for IDE 1.X.X

@stiliajohny
Copy link

I am getting the follopwing error when I am trying to compile

recipe.preproc.macros pattern is missing
Error compiling for board DaemonBite.

any ideas ?

@spyrohea
Copy link

spyrohea commented Jun 24, 2024

i am using not windows store version of ide and after copying folder to documents or appData it does not appear in the list (all following instructions).
but it works for win store version

update: added leonardo.upload.tool.serial=avrdude and used v2 ide, it sprinkled me with some warnings but job was done

@majid55-pixmini
Copy link

for me it is deducted as a Connexion and it can scroll up and down in the web page and other applications but not doing anything in the fusion 360 can someone please help me out here?

@NeoTrace82
Copy link

cannot find the folder ..\arduino\avr under OSX so i cannot create a custom board
can anyone help me out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment