diff --git a/hardware/arduino/bootloaders/diskloader/DiskLoader-Leonardo.hex b/hardware/arduino/bootloaders/diskloader/DiskLoader-Leonardo.hex index af819fbac..95ca57b21 100644 --- a/hardware/arduino/bootloaders/diskloader/DiskLoader-Leonardo.hex +++ b/hardware/arduino/bootloaders/diskloader/DiskLoader-Leonardo.hex @@ -10,7 +10,7 @@ :1078900074006C006F0061006400650072001803E2 :1078A000410072006400750069006E006F002000E6 :1078B0004C004C0043001201000202000040412332 -:1078C000340000010002030109024B0002010080A4 +:1078C000300000010002030109024B0002010080A8 :1078D00032080B000202020100090400000102024A :1078E0000000052400100105240101010424020206 :1078F000052406000107058103100040090401006A diff --git a/hardware/arduino/bootloaders/diskloader/Makefile b/hardware/arduino/bootloaders/diskloader/Makefile index 6ac3db37b..ed4ba7811 100644 --- a/hardware/arduino/bootloaders/diskloader/Makefile +++ b/hardware/arduino/bootloaders/diskloader/Makefile @@ -9,21 +9,22 @@ CC = avr-gcc # BOARD2 MCU = atmega32u4 -AVR_FREQ = 16000000L +AVR_FREQ = 16000000L -# Specify the Arduino model using the assigned PID. This is used by Descriptors.c -# to set PID and product descriptor string -# Arduino Leonardo PID -ARDUINO_MODEL_PID = 0x0034 -# Arduino Micro PID -#ARDUINO_MODEL_PID = 0x0035 +# Specify the Arduino model using the assigned PID. This is used by Descriptors.c +# to set PID and product descriptor string + +# Arduino Leonardo bootloader PID +ARDUINO_MODEL_PID = 0x0030 +# Arduino Micro bootloader PID +#ARDUINO_MODEL_PID = 0x0031 # Change if your programmer is different AVRDUDE_PROGRAMMER = avrispmkII AVRDUDE_PORT = usb # program name should not be changed... -PROGRAM = DiskLoader +PROGRAM = DiskLoader AVRDUDE = avrdude AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -p $(MCU) @@ -43,7 +44,6 @@ LDFLAGS = $(COMMON) LDFLAGS += -Wl,-gc-sections,-Map=DiskLoader.map,--section-start=.text=0x7800,--relax LDFLAGS += -nodefaultlibs -nostartfiles - ## Intel Hex file production flags HEX_EEPROM_FLAGS = -j .eeprom HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" @@ -102,4 +102,4 @@ size: $(TARGET) # @avr-size -C --mcu=${MCU} ${TARGET}.elf program: $(TARGET).hex - $(AVRDUDE) $(AVRDUDE_FLAGS) -B 5 -u -U flash:w:$(TARGET).hex \ No newline at end of file + $(AVRDUDE) $(AVRDUDE_FLAGS) -B 1 -u -U flash:w:$(TARGET).hex \ No newline at end of file diff --git a/hardware/arduino/bootloaders/diskloader/src/Platform.h b/hardware/arduino/bootloaders/diskloader/src/Platform.h index 57dc7d503..9d18e8059 100644 --- a/hardware/arduino/bootloaders/diskloader/src/Platform.h +++ b/hardware/arduino/bootloaders/diskloader/src/Platform.h @@ -14,8 +14,8 @@ #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) #define DISABLE_JTAG() MCUCR = (1 << JTD) | (1 << IVCE) | (0 << PUD); MCUCR = (1 << JTD) | (0 << IVSEL) | (0 << IVCE) | (0 << PUD); -#define USB_PID_LEONARDO 0x0034 -#define USB_PID_MICRO 0x0035 +#define USB_PID_LEONARDO_BOOTLOADER 0x0030 +#define USB_PID_MICRO_BOOTLOADER 0x0031 #define USB_VID 0x2341 // arduino LLC vid #define USB_PID ARDUINO_MODEL_PID // passed in by Makefile - 0x0034 for Leonardo, 0x0035 for MIcro diff --git a/hardware/arduino/bootloaders/diskloader/src/USBDesc.cpp b/hardware/arduino/bootloaders/diskloader/src/USBDesc.cpp index 71608689d..a634d4da3 100644 --- a/hardware/arduino/bootloaders/diskloader/src/USBDesc.cpp +++ b/hardware/arduino/bootloaders/diskloader/src/USBDesc.cpp @@ -34,9 +34,9 @@ const uint16_t STRING_SERIAL[13] = { const uint16_t STRING_IPRODUCT[28] = { (3<<8) | (2+2*27), -#if USB_PID == USB_PID_LEONARDO +#if USB_PID == USB_PID_LEONARDO_BOOTLOADER 'A','r','d','u','i','n','o',' ','L','e','o','n','a','r','d','o',' ','b','o','o','t','l','o','a','d','e','r' -#elif USB_PID == USB_PID_MICRO +#elif USB_PID == USB_PID_MICRO_BOOTLOADER 'A','r','d','u','i','n','o',' ','M','i','c','r','o',' ','b','o','o','t','l','o','a','d','e','r',' ',' ',' ' #endif };