Skip to content

Commit f689991

Browse files
committed
Adding LilyPad Arduino USB.
1 parent 98a7ab9 commit f689991

File tree

11 files changed

+2402
-2
lines changed

11 files changed

+2402
-2
lines changed

app/src/processing/app/debug/AvrdudeUploader.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ private boolean uploadViaBootloader(String buildPath, String className)
8585
// this wait a moment for the bootloader to enumerate. On Windows, also must
8686
// deal with the fact that the COM port number changes from bootloader to
8787
// sketch.
88-
if (boardPreferences.get("bootloader.path") != null && boardPreferences.get("bootloader.path").equals("caterina")) {
88+
if (boardPreferences.get("bootloader.path") != null &&
89+
(boardPreferences.get("bootloader.path").equals("caterina") ||
90+
boardPreferences.get("bootloader.path").equals("caterina-LilyPadUSB"))) {
8991
String caterinaUploadPort = null;
9092
try {
9193
// Toggle 1200 bps on selected serial port to force board reset.
@@ -178,7 +180,9 @@ private boolean uploadViaBootloader(String buildPath, String className)
178180
// port reconnects (or timeout after a few seconds if the sketch port never comes back).
179181
// Doing this saves users from accidentally opening Serial Monitor on the soon-to-be-orphaned
180182
// bootloader port.
181-
if (true == avrdudeResult && boardPreferences.get("bootloader.path") != null && boardPreferences.get("bootloader.path").equals("caterina")) {
183+
if (true == avrdudeResult && boardPreferences.get("bootloader.path") != null &&
184+
(boardPreferences.get("bootloader.path").equals("caterina") ||
185+
boardPreferences.get("bootloader.path").equals("caterina-LilyPadUSB"))) {
182186
try {
183187
Thread.sleep(500);
184188
} catch (InterruptedException ex) { }
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
;************************************************************
2+
; Windows USB CDC ACM Setup File
3+
; Copyright (c) 2000 Microsoft Corporation
4+
5+
6+
[Version]
7+
Signature="$Windows NT$"
8+
Class=Ports
9+
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
10+
Provider=%MFGNAME%
11+
LayoutFile=layout.inf
12+
CatalogFile=%MFGFILENAME%.cat
13+
DriverVer=11/15/2007,5.1.2600.0
14+
15+
[Manufacturer]
16+
%MFGNAME%=DeviceList, NTamd64
17+
18+
[DestinationDirs]
19+
DefaultDestDir=12
20+
21+
22+
;------------------------------------------------------------------------------
23+
; Windows 2000/XP/Vista-32bit Sections
24+
;------------------------------------------------------------------------------
25+
26+
[DriverInstall.nt]
27+
include=mdmcpq.inf
28+
CopyFiles=DriverCopyFiles.nt
29+
AddReg=DriverInstall.nt.AddReg
30+
31+
[DriverCopyFiles.nt]
32+
usbser.sys,,,0x20
33+
34+
[DriverInstall.nt.AddReg]
35+
HKR,,DevLoader,,*ntkern
36+
HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
37+
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
38+
39+
[DriverInstall.nt.Services]
40+
AddService=usbser, 0x00000002, DriverService.nt
41+
42+
[DriverService.nt]
43+
DisplayName=%SERVICE%
44+
ServiceType=1
45+
StartType=3
46+
ErrorControl=1
47+
ServiceBinary=%12%\%DRIVERFILENAME%.sys
48+
49+
;------------------------------------------------------------------------------
50+
; Vista-64bit Sections
51+
;------------------------------------------------------------------------------
52+
53+
[DriverInstall.NTamd64]
54+
include=mdmcpq.inf
55+
CopyFiles=DriverCopyFiles.NTamd64
56+
AddReg=DriverInstall.NTamd64.AddReg
57+
58+
[DriverCopyFiles.NTamd64]
59+
%DRIVERFILENAME%.sys,,,0x20
60+
61+
[DriverInstall.NTamd64.AddReg]
62+
HKR,,DevLoader,,*ntkern
63+
HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
64+
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
65+
66+
[DriverInstall.NTamd64.Services]
67+
AddService=usbser, 0x00000002, DriverService.NTamd64
68+
69+
[DriverService.NTamd64]
70+
DisplayName=%SERVICE%
71+
ServiceType=1
72+
StartType=3
73+
ErrorControl=1
74+
ServiceBinary=%12%\%DRIVERFILENAME%.sys
75+
76+
77+
;------------------------------------------------------------------------------
78+
; Vendor and Product ID Definitions
79+
;------------------------------------------------------------------------------
80+
; When developing your USB device, the VID and PID used in the PC side
81+
; application program and the firmware on the microcontroller must match.
82+
; Modify the below line to use your VID and PID. Use the format as shown below.
83+
; Note: One INF file can be used for multiple devices with different VID and PIDs.
84+
; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
85+
;------------------------------------------------------------------------------
86+
[SourceDisksFiles]
87+
[SourceDisksNames]
88+
[DeviceList]
89+
%DESCRIPTION%=DriverInstall, USB\VID_1B4F&PID_9207
90+
%DESCRIPTION%=DriverInstall, USB\VID_1B4F&PID_9208&MI_00
91+
92+
[DeviceList.NTamd64]
93+
%DESCRIPTION%=DriverInstall, USB\VID_1B4F&PID_9207
94+
%DESCRIPTION%=DriverInstall, USB\VID_1B4F&PID_9208&MI_00
95+
96+
;------------------------------------------------------------------------------
97+
; String Definitions
98+
;------------------------------------------------------------------------------
99+
;Modify these strings to customize your device
100+
;------------------------------------------------------------------------------
101+
[Strings]
102+
MFGFILENAME="CDC_vista"
103+
DRIVERFILENAME ="usbser"
104+
MFGNAME="SparkFun Electronics"
105+
INSTDISK="SparkFun LilyPadUSB Driver Installer"
106+
DESCRIPTION="SparkFun LilyPadUSB"
107+
SERVICE="USB RS-232 Emulation Driver"

hardware/arduino/boards.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,27 @@ bt.build.variant=eightanaloginputs
316316

317317
##############################################################
318318

319+
LilyPadUSB.name=LilyPad Arduino USB
320+
LilyPadUSB.upload.protocol=avr109
321+
LilyPadUSB.upload.maximum_size=28672
322+
LilyPadUSB.upload.speed=57600
323+
LilyPadUSB.upload.disable_flushing=true
324+
LilyPadUSB.bootloader.low_fuses=0xff
325+
LilyPadUSB.bootloader.high_fuses=0xd8
326+
LilyPadUSB.bootloader.extended_fuses=0xce
327+
LilyPadUSB.bootloader.path=caterina-LilyPadUSB
328+
LilyPadUSB.bootloader.file=Caterina-LilyPadUSB.hex
329+
LilyPadUSB.bootloader.unlock_bits=0x3F
330+
LilyPadUSB.bootloader.lock_bits=0x2F
331+
LilyPadUSB.build.mcu=atmega32u4
332+
LilyPadUSB.build.f_cpu=8000000L
333+
LilyPadUSB.build.vid=0x1B4F
334+
LilyPadUSB.build.pid=0x9208
335+
LilyPadUSB.build.core=arduino
336+
LilyPadUSB.build.variant=leonardo
337+
338+
##############################################################
339+
319340
lilypad328.name=LilyPad Arduino w/ ATmega328
320341

321342
lilypad328.upload.protocol=arduino

0 commit comments

Comments
 (0)