sparkfun / SF32u4_boards

Support files for SparkFun's 32u4-based Arduino-compatible development boards.
70 stars 75 forks source link

How to build for Arduino Leonardo? #12

Closed chrisjshull closed 9 years ago

chrisjshull commented 9 years ago

Not really an issue, but I was hoping to get some help.

jbdatko commented 9 years ago

I'm just a passerby trying to help, but I'm not sure what you mean. I've got the Leonardo and on a modern IDE version (1.5.x? I think, whatever the latest is) I don't need any of these files to download code. It just worked. So, maybe download a new version of the IDE and you should see Leonardo in the boards pulldown?

mhord commented 9 years ago

jbdatko is right- Leonardo should be built in to all Arduino versions later than 1.0 (I think; it's certainly been in the last couple of releases).

It might help if I explain what exactly necessitates the use of the repo. There are two things: the clock speed and the VID/PID of the USB device. For some of the devices in this library, the clock runs at 8MHz instead of 16, and that requires recalculation of certain constants used at build time. The bigger issue is the VID/PID. These are constants used by USB devices to identify the proper driver to use as well as to identify the manufacturer of the device. The USB Implementer's Forum issues the VID to companies wishing to produce USB devices, and it's not free, so reuse of another company's VID is, to say the least, not okay.

Support for the Leonardo is built in to the IDE, but the VID/PID issue means that, unlike Uno derivatives using off-the-shelf USB to UART conversion chips, and Leonardo derivative must have its own VID and PID. Hence, this repository.