From dd45f78b21f9d64323190b77daa9ee55fd168537 Mon Sep 17 00:00:00 2001 From: Dan Villiom Podlaski Christiansen Date: Wed, 12 Sep 2012 13:25:43 +0200 Subject: [PATCH] Add USB_VID and USB_PID definitions used by the Arduino Leonardo. --- arduino-mk/Arduino.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 5261afa..b4b87e0 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -387,6 +387,18 @@ ifndef F_CPU F_CPU = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.f_cpu) endif +ifndef F_CPU +F_CPU = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.f_cpu) +endif + +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) @@ -495,6 +507,7 @@ USER_LIB_OBJS = $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(USER_LIB_ $(patsubst $(USER_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(USER_LIB_C_SRCS)) CPPFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) \ + -DUSB_VID=$(USB_VID) -DUSB_PID=$(USB_PID) \ -I. -I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VAR_PATH)/$(VARIANT) \ $(SYS_INCLUDES) $(USER_INCLUDES) -g -Os -w -Wall \ -ffunction-sections -fdata-sections