Added support for the USB PID/VID needed for the Leonardo, as per patches from Dan Villiom Podlaski Christiansen and Marc Plano-Lesay
This commit is contained in:
parent
9395817c96
commit
869b5d8516
1 changed files with 11 additions and 0 deletions
|
@ -389,6 +389,15 @@ ifndef F_CPU
|
|||
F_CPU = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.f_cpu)
|
||||
endif
|
||||
|
||||
# USB IDs for the Leonardo
|
||||
ifndef USB_VID
|
||||
USB_VID = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.vid)
|
||||
endif
|
||||
|
||||
ifndef USB_PID
|
||||
USB_PID = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.pid)
|
||||
endif
|
||||
|
||||
# normal programming info
|
||||
ifndef AVRDUDE_ARD_PROGRAMMER
|
||||
AVRDUDE_ARD_PROGRAMMER = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) upload.protocol)
|
||||
|
@ -501,7 +510,9 @@ USER_LIB_OBJS = $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(USER_LIB_
|
|||
CPPFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) \
|
||||
-I. -I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VAR_PATH)/$(VARIANT) \
|
||||
$(SYS_INCLUDES) $(USER_INCLUDES) -g -Os -w -Wall \
|
||||
-DUSB_VID=$(USB_VID) -DUSB_PID=$(USB_PID) \
|
||||
-ffunction-sections -fdata-sections
|
||||
|
||||
CFLAGS = -std=gnu99
|
||||
CXXFLAGS = -fno-exceptions
|
||||
ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp
|
||||
|
|
Loading…
Reference in a new issue