I've been looking to modify the Arduino Micro bootloader (specifically changing the VendorID and ProductID) of the Arduino. What bootloader comes pre-installed on the Arduino Micro? and how would I go about building and uploading a modified bootloader?
1 Answer 1
Try looking at https://github.com/arduino/ArduinoCore-avr/blob/master/bootloaders/caterina/Descriptors.c
Inside that is:
/** Device descriptor structure. This descriptor, located in SRAM memory, describes the overall
* device characteristics, including the supported USB version, control endpoint size and the
* number of device configurations. The descriptor is read out by the USB host when the enumeration
* process begins.
*/
const USB_Descriptor_Device_t DeviceDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10),
.Class = CDC_CSCP_CDCClass,
.SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = CDC_CSCP_NoSpecificProtocol,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
.VendorID = DEVICE_VID,
.ProductID = DEVICE_PID,
.ReleaseNumber = VERSION_BCD(00.01),
.ManufacturerStrIndex = 0x02,
.ProductStrIndex = 0x01,
.SerialNumStrIndex = NO_DESCRIPTOR,
.NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
};
...
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
* and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
const USB_Descriptor_String_t ProductString =
{
.Header = {.Size = USB_STRING_LEN(16), .Type = DTYPE_String},
#if DEVICE_PID == 0x0036
.UnicodeString = L"Arduino Leonardo"
#elif DEVICE_PID == 0x0037
.UnicodeString = L"Arduino Micro "
#elif DEVICE_PID == 0x003C
.UnicodeString = L"Arduino Esplora "
#else
.UnicodeString = L"USB IO board "
#endif
};
and how would I go about building and uploading a modified bootloader?
You would run the Makefile which is in the same directory as the above file. Then send the resulting .hex file to your device.
-
The
github.com
link is broken: "404 - page not found"Peter Mortensen– Peter Mortensen2025年08月29日 17:00:27 +00:00Commented Aug 29 at 17:00 -
@PeterMortensen Arduino reorganised their repositories. I found the new location and amended the answer.2025年09月04日 22:11:29 +00:00Commented Sep 4 at 22:11