aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-05 15:38:22 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-07 03:38:29 -0400
commit221a3eb9aa5bb8318c4c2cafabd4cb4a9db2eea2 (patch)
tree7dc41fd6dea8a06c2c7537492341e848604990b5
parentbc6d7181b8fe73fb4f7343a6eeec3da9342bc1fc (diff)
downloadlibrambutan-221a3eb9aa5bb8318c4c2cafabd4cb4a9db2eea2.tar.gz
librambutan-221a3eb9aa5bb8318c4c2cafabd4cb4a9db2eea2.zip
Makefile: move the fake VID/PID, to hide our shame.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r--Makefile11
1 files changed, 5 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index e3a1e4f..56a8f50 100644
--- a/Makefile
+++ b/Makefile
@@ -20,10 +20,6 @@ LDDIR := $(SUPPORT_PATH)/ld
# Support files for this Makefile
MAKEDIR := $(SUPPORT_PATH)/make
-# USB ID for DFU upload
-VENDOR_ID := 1EAF
-PRODUCT_ID := 0003
-
##
## Target-specific configuration. This determines some compiler and
## linker options/flags.
@@ -99,12 +95,15 @@ include $(SRCROOT)/build-targets.mk
.PHONY: install sketch clean help debug cscope tags ctags ram flash jtag doxygen mrproper
# Target upload commands
+# USB ID for DFU upload -- FIXME: do something smarter with this
+BOARD_USB_VENDOR_ID := 1EAF
+BOARD_USB_PRODUCT_ID := 0003
UPLOAD_ram := $(SUPPORT_PATH)/scripts/reset.py && \
sleep 1 && \
- $(DFU) -a0 -d $(VENDOR_ID):$(PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R
+ $(DFU) -a0 -d $(BOARD_USB_VENDOR_ID):$(BOARD_USB_PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R
UPLOAD_flash := $(SUPPORT_PATH)/scripts/reset.py && \
sleep 1 && \
- $(DFU) -a1 -d $(VENDOR_ID):$(PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R
+ $(DFU) -a1 -d $(BOARD_USB_VENDOR_ID):$(BOARD_USB_PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R
UPLOAD_jtag := $(OPENOCD_WRAPPER) flash
# Conditionally upload to whatever the last build was