Skip to content

[bl] Allowing USB VID customization #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bootloaders/zero/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ ifeq ($(OS),Windows_NT)
# Are we using mingw/msys/msys2/cygwin?
ifeq ($(TERM),xterm)
# this is the path coming with night build
# T=$(shell cygpath -u $(LOCALAPPDATA))
T=$(shell cygpath -u $(LOCALAPPDATA))
# this is the path till 1.6.5 r5
T=$(shell cygpath -u $(APPDATA))
# T=$(shell cygpath -u $(APPDATA))
MODULE_PATH?=$(T)/Arduino15/packages/arduino
ARM_GCC_PATH?=$(MODULE_PATH)/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-
RM=rm
SEP=/
else
# this is the path coming with night build
# MODULE_PATH?=$(LOCALAPPDATA)/Arduino15/packages/arduino
MODULE_PATH?=$(LOCALAPPDATA)/Arduino15/packages/arduino
# this is the path till 1.6.5 r5
MODULE_PATH?=$(APPDATA)/Arduino15/packages/arduino
# MODULE_PATH?=$(APPDATA)/Arduino15/packages/arduino
ARM_GCC_PATH?=$(MODULE_PATH)/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-
RM=rm
SEP=\\
Expand Down Expand Up @@ -75,9 +75,9 @@ CFLAGS+=-Os -DDEBUG=0
endif

# Arduino Zero (PID == 0x004D)
CFLAGS_EXTRA?=-D__SAMD21G18A__ -DUSB_PID_HIGH=0x00 -DUSB_PID_LOW=0x4D
CFLAGS_EXTRA?=-D__SAMD21G18A__ -DUSB_PID_HIGH=0x00 -DUSB_PID_LOW=0x4D -DUSB_VID_LOW=0x41 -DUSB_VID_HIGH=0x23
# Genuino Zero (PID == 0x024D)
# CFLAGS_EXTRA?=-D__SAMD21G18A__ -DUSB_PID_HIGH=0x02 -DUSB_PID_LOW=0x4D
# CFLAGS_EXTRA?=-D__SAMD21G18A__ -DUSB_PID_HIGH=0x02 -DUSB_PID_LOW=0x4D -DUSB_VID_LOW=0x41 -DUSB_VID_HIGH=0x23

INCLUDES=-I"$(MODULE_PATH)/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" -I"$(MODULE_PATH)/tools/CMSIS/4.0.0-atmel/Device/ATMEL/"

Expand Down
4 changes: 2 additions & 2 deletions bootloaders/zero/sam_ba_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const char devDescriptor[] =
0x00, // bDeviceSubclass: CDC class sub code
0x00, // bDeviceProtocol: CDC Device protocol
0x40, // bMaxPacketSize0
0x41, // idVendor L
0x23, // idVendor H
USB_VID_LOW, // idVendor L
USB_VID_HIGH, // idVendor H
USB_PID_LOW, // idProduct L
USB_PID_HIGH, // idProduct H
0x00, // bcdDevice L, here matching SAM-BA version
Expand Down