From cb5b07ae94819042153bed316bc57c97db0c6641 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Thu, 8 Sep 2011 09:47:17 -0400 Subject: changed PIDs for Leonardo and Micro. PIDs are now defined in the Makefile --- bootloaders/diskloader/DiskLoader.hex | 4 ++-- bootloaders/diskloader/Makefile | 8 +++++++- bootloaders/diskloader/src/Platform.h | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'bootloaders/diskloader') diff --git a/bootloaders/diskloader/DiskLoader.hex b/bootloaders/diskloader/DiskLoader.hex index ae27666..7ca0c74 100644 --- a/bootloaders/diskloader/DiskLoader.hex +++ b/bootloaders/diskloader/DiskLoader.hex @@ -3,8 +3,8 @@ :1078200087020110030000C18081C106C0FF0A0069 :107830000CA10185037508150026FF00954009017C :107840008102954009029102C0040309041201005B -:10785000020200004041232000000100000101124B -:10786000010002000000404123200000010000014F +:107850000202000040412334000001000001011237 +:10786000010002000000404123340000010000013B :1078700001090264000301008032080B00020202C9 :1078800001000904000001020200000524001001AB :107890000524010101042402020524060001070554 diff --git a/bootloaders/diskloader/Makefile b/bootloaders/diskloader/Makefile index ca6e11e..6ac3db3 100644 --- a/bootloaders/diskloader/Makefile +++ b/bootloaders/diskloader/Makefile @@ -11,6 +11,12 @@ CC = avr-gcc MCU = atmega32u4 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 # Change if your programmer is different AVRDUDE_PROGRAMMER = avrispmkII @@ -25,7 +31,7 @@ AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -p $(MCU) ## Options common to compile, link and assembly rules COMMON = -mmcu=$(MCU) -override CFLAGS = -g -Wall -Os -mmcu=$(MCU) -DF_CPU=$(AVR_FREQ) $(DEFS) -ffunction-sections -gdwarf-2 -fdata-sections -fno-split-wide-types +override CFLAGS = -g -Wall -Os -mmcu=$(MCU) -DF_CPU=$(AVR_FREQ) -DARDUINO_MODEL_PID=$(ARDUINO_MODEL_PID) $(DEFS) -ffunction-sections -gdwarf-2 -fdata-sections -fno-split-wide-types ## Assembly specific flags ASMFLAGS = $(COMMON) diff --git a/bootloaders/diskloader/src/Platform.h b/bootloaders/diskloader/src/Platform.h index 416d9c3..278b408 100644 --- a/bootloaders/diskloader/src/Platform.h +++ b/bootloaders/diskloader/src/Platform.h @@ -19,9 +19,9 @@ typedef unsigned long u32; #define DISABLE_JTAG() MCUCR = (1 << JTD) | (1 << IVCE) | (0 << PUD); MCUCR = (1 << JTD) | (0 << IVSEL) | (0 << IVCE) | (0 << PUD); #define USB_VID 0x2341 // arduino LLC vid -#define USB_PID 0x0020 // educated guess +#define USB_PID ARDUINO_MODEL_PID // passed in by Makefile - 0x0034 for Leonardo, 0x0035 for MIcro -#define FAT_OEM_NAME 'l','e','o','n','a','r','d','o' // 8 chars +#define OEM_NAME 'l','e','o','n','a','r','d','o' // 8 chars #define BOARD_INIT() DDRC |= (1<<7); DDRB |= (1<<0); DDRE |= (1<<6); CPU_PRESCALE(0); DISABLE_JTAG(); #define LED0 PORTC &= ~(1<<7) #define LED1 PORTC |= (1<<7) -- cgit v1.2.3-18-g5258