Sketch doesn't compile out of the box - USB_VID and USB_PID undefined
Closed this issue · 3 comments
I attempt to build and get the following:
/home/brennen/sketchbook/hardware/MaKeyMaKey/cores/arduino/USBCore.cpp:78:2: error: 'USB_VID' was not declared in this scope
/home/brennen/sketchbook/hardware/MaKeyMaKey/cores/arduino/USBCore.cpp:78:2: error: 'USB_PID' was not declared in this scope
/home/brennen/sketchbook/hardware/MaKeyMaKey/cores/arduino/USBCore.cpp:81:2: error: 'USB_VID' was not declared in this scope
/home/brennen/sketchbook/hardware/MaKeyMaKey/cores/arduino/USBCore.cpp:81:2: error: 'USB_PID' was not declared in this scope
I was able to fix this by popping
#define USB_VID 0x1B4F
#define USB_PID 0xF101
at the bottom of firmware/Arduino/hardware/MaKeyMaKey/cores/arduino/USBDesc.h
, which seems to be where they live in the stock Arduino libs.
Thoughts?
The VID and PID are nominally assigned in the BOARDS.TXT file -or- the
Makefile (in the case of the bootloader).
What version of the IDE are you using? If it's before 1.0.1 consider
upgrading.
On Fri, Oct 26, 2012 at 11:49 AM, Brennen Bearnes
notifications@github.comwrote:
I attempt to build and get the following:
/home/brennen/sketchbook/hardware/MaKeyMaKey/cores/arduino/USBCore.cpp:78:2: error: 'USB_VID' was not declared in this scope
/home/brennen/sketchbook/hardware/MaKeyMaKey/cores/arduino/USBCore.cpp:78:2: error: 'USB_PID' was not declared in this scope
/home/brennen/sketchbook/hardware/MaKeyMaKey/cores/arduino/USBCore.cpp:81:2: error: 'USB_VID' was not declared in this scope
/home/brennen/sketchbook/hardware/MaKeyMaKey/cores/arduino/USBCore.cpp:81:2: error: 'USB_PID' was not declared in this scopeI was able to fix this by popping
#define USB_VID 0x1B4F
#define USB_PID 0xF101at the bottom of
firmware/Arduino/hardware/MaKeyMaKey/cores/arduino/USBDesc.h, which seems
to be where they live in the stock Arduino libs.Thoughts?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/2.
Yup, they're defined in boards.txt:
makeymakey.build.vid=0x1B4F makeymakey.build.pid=0x2B75
Make sure you've got the MaKeyMaKey directory installed in a hardware directory in your sketchbook, and select MaKey MaKey from the Tools>Boards menu. But from the look of your directory structure, it seems like you've got that set up already.
You're not using the "beta" Arduino 1.5 by chance?
Thanks fellas - looks like I was just a version behind on the laptop where I've been messing around with this. My bad.