aboutsummaryrefslogtreecommitdiff
path: root/bootloaders/caterina
diff options
context:
space:
mode:
Diffstat (limited to 'bootloaders/caterina')
-rw-r--r--bootloaders/caterina/Caterina-Leonardo.hex219
-rw-r--r--bootloaders/caterina/src/Platform.h2
-rw-r--r--bootloaders/caterina/src/USBCore.cpp4
-rw-r--r--bootloaders/caterina/src/USBDesc.cpp4
4 files changed, 117 insertions, 112 deletions
diff --git a/bootloaders/caterina/Caterina-Leonardo.hex b/bootloaders/caterina/Caterina-Leonardo.hex
index c882f7f..44a452e 100644
--- a/bootloaders/caterina/Caterina-Leonardo.hex
+++ b/bootloaders/caterina/Caterina-Leonardo.hex
@@ -1,117 +1,120 @@
-:1078000011241FBECFEFDAE0DEBFCDBF02C14101C0
+:1078000011241FBECFEFDAE0DEBFCDBF0BC14101B7
:1078100042144505560455026403740300001E9586
:1078200087020110030000C18081C106C0FF0A0069
:107830000CA10185037508150026FF00954009017C
:107840008102954009029102C0040309041A033021
:1078500000300030003000300030003000300031A7
-:1078600000370030003100380341007200640075B9
-:107870000069006E006F0020004C0065006F006E14
-:10788000006100720064006F00200062006F006FF2
-:107890000074006C006F00610064006500720018E5
+:107860000037003000310038030000000000000045
+:107870000000000000000000000000000000000008
+:1078800000000000000000000000000000000000F8
+:1078900000000000000000000000000000000018D0
:1078A00003410072006400750069006E006F0020E3
:1078B000004C004C00430012010002020000404155
-:1078C00023300000010002030109026400030100EB
-:1078D0008032080B000202020100090400000102CC
-:1078E0000200000524001001052401010104240206
-:1078F0000205240600010705810310004009040168
-:1079000000020A000000070502024000000705838C
-:1079100002400000090402000103000000092101E7
-:10792000010001221E000705840340004000209151
-:107930008A0130918B012C5F3F4F30938B01209354
-:107940008A01C901892F99278695982F803418F0CC
-:107950008FE7891B982F990F921710F44798089575
-:10796000479A08955D9A289A81E08093E0001092EA
-:10797000E200EE27FF270994089528E088E190E0CF
-:107980000FB6F894A895809360000FBE2093600016
-:10799000FFCF0F931F93CF93DF93982FEB01042F0B
-:1079A00010E088E76030780730F411E083E0FB01F5
-:1079B00080935700E895892F68E071E0402F06D149
-:1079C000112311F107B600FCFDCF402F4695FE01B3
-:1079D000A8E0B1E020E031E009C08D919D910C015B
-:1079E00030935700E895112432962F5F2417A8F39F
-:1079F00085E0FE0180935700E89507B600FCFDCFB7
-:107A000081E180935700E895DF91CF911F910F910D
-:107A1000089584B794B7977F94BF98E10FB6F89410
-:107A200090936000109260000FBE5D9A289A47986C
-:107A300083FF08C0E0E0F0E0859194918F5F9F4F55
-:107A400009F090DF3F9A209A559A90E89093610050
-:107A50001092610081E885BF95BF9FD084E180933B
-:107A6000880180E180938901E0E0F0E085919491C4
-:107A70008F5F9F4F19F081E080938F01EE24FF24E8
-:107A8000BB24B39454EFC52E51E0D52E10D2082F4D
-:107A90008EE098E7FC0124913196029644912017DC
-:107AA00011F02223B9F7109291011092900182E017
-:107AB00068E071E08BD0013479F46091080160587E
-:107AC000633028F0683111F064E001C063E0C62F34
-:107AD000D0E0CF5DD7480EC0063571F48091080123
-:107AE000803311F011E022C080910A01C82FD0E04C
-:107AF000C25ED74811E022C0053721F413E0CEE181
-:107B0000D8E71CC0053539F4E0900801F090090170
-:107B1000EE0CFF1C0AC0043631F482E0B70140913C
-:107B2000090137DF02C0043721F010E0C5E2D8E7D1
-:107B300005C010910901E701E10EF11CB8D1809751
-:107B4000B1F483E068E871E041E050E059D01123DE
-:107B500029F0412F50E083E8BE0152D083E469E868
-:107B600071E041E050E04CD0013509F08FCFD09268
-:107B70009101C0929001B0928F01EE24FF2486CF34
-:107B8000FC01289884E680938D0104C08091F10067
-:107B9000819361506623D1F708951092910110925C
-:107BA000900110928E0110928F0181E08093D70096
-:107BB00080EA8093D80082E189BD09B400FEFDCF40
-:107BC00080E98093D8001092E0000895FB01809333
-:107BD000E90024E69BE611C08091E80085FFFCCF18
-:107BE000289820938D018091F10081938091E80085
-:107BF00085FD02C09093E8004150442369F7089541
-:107C0000982FFB01282F207287708093E90064E68B
-:107C10003AE317C08091E80085FFFCCF97FF02C0D0
-:107C2000849101C080813196211180E05D9860933C
-:107C30008C018093F1008091E80085FD02C03093B3
-:107C4000E800415050408FEF4F3F580719F796FF1B
-:107C500003C08AE38093E800089580919301813204
-:107C600099F45D9884E680938C0120E030E003C0B5
-:107C700080818093F100F901E050FF4F2F5F3F4F6B
-:107C800028303105A9F714C0803261F48091E800F2
-:107C900082FFFCCF80E091E067E072DF8BEF8093A2
-:107CA000E80006C0823221F480919401809307019C
-:107CB00081E0089580919501823219F1813009F4B3
-:107CC00056C0823029F484E690E029EC38E71DC0E4
-:107CD000833009F04AC080919401882319F429E483
-:107CE00038E747C0823019F427E638E742C08330CE
-:107CF00019F42DE438E73DC08130B9F52FE938E7B4
-:107D000038C082E090E02BE238E740919801509132
-:107D10009901BC014817590708F4BA0190918C01E8
-:107D200040E050E0AEEF8091E8008570E1F3809193
-:107D3000E80082FD16C0F901E40FF51F4F5F5F4FA9
-:107D4000E4915D98E093F100842F8F7311F4A09378
-:107D5000E80094E64617570730F390938C0181E0D2
-:107D6000089590938C0180E0089580E0089527EBBA
-:107D700038E7F901849190E0C8CF1092E900809132
-:107D8000E80083FF61C082E991E068E0F9DE82EFFC
-:107D90008093E8008091920187FF05C08091E80000
-:107DA00080FFFCCF03C08EEF8093E80080919301A9
-:107DB000853051F48091E80080FFFCCF80919401E0
-:107DC00080688093E30039C08930E1F480919401A8
-:107DD00080938E01E7E2F8E791E031E026E39093AB
-:107DE000E9003093EB0084918093EC002093ED0048
-:107DF0009F5F3196953099F78EE78093EA00109255
-:107E0000EA001BC0883049F490918E015D9884E6A9
-:107E100080938C019093F10010C0882339F45D9811
-:107E200084E680938C011092F10007C0863011F433
-:107E300041DF01C012DF882321F08EEF8093E8003C
-:107E4000089581E28093EB0008958091E100109203
-:107E5000E100282F83FF0CC01092E90081E080939D
-:107E6000EB001092EC0082E38093ED0010928E0103
-:107E700022FF1CC080918C01882331F081508093B7
-:107E80008C01882309F45D9A80918D01882331F05B
-:107E9000815080938D01882309F4289A80918F0165
-:107EA000882321F4109291011092900108951F935C
-:107EB000CF93DF9312E0C0E9D1E05FDFC6DF10931C
-:107EC000E9008091E80085FF13C0289884E680933C
-:107ED0008D019091F1008091E80085FD03C08BE653
-:107EE0008093E800892F90E0DF91CF911F91089552
-:107EF00080919001909191010197909391018093CD
-:107F000090018091900190919101892B09F435DDC8
-:0A7F1000CE010197F1F70BDDD0CF91
-:087F1A0000E10000000000007E
+:1078C0002330000001000203011201000200000049
+:1078D000404123300000010002030109026400035B
+:1078E00001008032080B00020202010009040000BE
+:1078F0000102020000052400100105240101010419
+:107900002402020524060001070581031000400936
+:10791000040100020A0000000705020240000007FF
+:107920000583024000000904020001030000000971
+:107930002101010001221E000705840340004000D0
+:1079400020918A0130918B012C5F3F4F30938B0146
+:1079500020938A01C901892F99278695982F803411
+:1079600018F08FE7891B982F990F921710F44798FA
+:107970000895479A08955D9A289A81E08093E000DF
+:107980001092E200EE27FF270994089528E088E18D
+:1079900090E00FB6F894A895809360000FBE2093F6
+:1079A0006000FFCF0F931F93CF93DF93982FEB01CE
+:1079B000042F10E088E76030780730F411E083E0AE
+:1079C000FB0180935700E895892F68E071E0402F14
+:1079D00006D1112311F107B600FCFDCF402F4695CB
+:1079E000FE01A8E0B1E020E031E009C08D919D9159
+:1079F0000C0130935700E895112432962F5F24171D
+:107A0000A8F385E0FE0180935700E89507B600FCD7
+:107A1000FDCF81E180935700E895DF91CF911F91D1
+:107A20000F91089584B794B7977F94BF98E10FB6EC
+:107A3000F89490936000109260000FBE5D9A289AAF
+:107A4000479883FF08C0E0E0F0E0859194918F5F54
+:107A50009F4F09F090DF3F9A209A559A90E89093B3
+:107A600061001092610081E885BF95BF9FD084E1DD
+:107A70008093880180E180938901E0E0F0E08591C6
+:107A800094918F5F9F4F19F081E080938F01EE24D6
+:107A9000FF24BB24B39454EFC52E51E0D52E1FD242
+:107AA000082F8EE098E7FC012491319602964491CC
+:107AB000201711F02223B9F7109291011092900132
+:107AC00082E068E071E08BD0013479F460910801C4
+:107AD0006058633028F0683111F064E001C063E061
+:107AE000C62FD0E0CF5DD7480EC0063571F4809127
+:107AF0000801803311F011E022C080910A01C82FE3
+:107B0000D0E0C25ED74811E022C0053721F413E06F
+:107B1000CEE1D8E71CC0053539F4E0900801F090BB
+:107B20000901EE0CFF1C0AC0043631F482E0B701F3
+:107B30004091090137DF02C0043721F010E0C5E2AF
+:107B4000D8E705C010910901E701E10EF11CC7D18A
+:107B50008097B1F483E068E871E041E050E059D0EB
+:107B6000112329F0412F50E083E8BE0152D083E475
+:107B700069E871E041E050E04CD0013509F08FCF69
+:107B8000D0929101C0929001B0928F01EE24FF2417
+:107B900086CFFC01289884E680938D0104C08091F3
+:107BA000F100819361506623D1F7089510929101FD
+:107BB0001092900110928E0110928F0181E08093BB
+:107BC000D70080EA8093D80082E189BD09B400FE25
+:107BD000FDCF80E98093D8001092E0000895FB016A
+:107BE0008093E90024E69BE611C08091E80085FFC0
+:107BF000FCCF289820938D018091F1008193809192
+:107C0000E80085FD02C09093E8004150442369F7E5
+:107C10000895982FFB01282F207287708093E90028
+:107C200064E63AE317C08091E80085FFFCCF97FF38
+:107C300002C0849101C080813196211180E05D985D
+:107C400060938C018093F1008091E80085FD02C073
+:107C50003093E800415050408FEF4F3F580719F7DD
+:107C600096FF03C08AE38093E80008958091930112
+:107C7000813299F45D9884E680938C0120E030E0B5
+:107C800003C080818093F100F901E050FF4F2F5F26
+:107C90003F4F28303105A9F714C0803261F480913C
+:107CA000E80082FFFCCF80E091E067E072DF8BEFBD
+:107CB0008093E80006C0823221F480919401809381
+:107CC000070181E0089520919501223291F1213040
+:107CD00081F48091980190919901089711F4209373
+:107CE0009A0180919A01882309F059C029EC38E75C
+:107CF00058C0223029F484E690E02BED38E71DC00F
+:107D0000233009F04AC080919401882319F429E4B2
+:107D100038E747C0823019F427E638E742C083309D
+:107D200019F42DE438E73DC08130B9F52FE938E783
+:107D300038C082E090E02BE238E740919801509102
+:107D40009901BC014817590708F4BA0190918C01B8
+:107D500040E050E0AEEF8091E8008570E1F3809163
+:107D6000E80082FD16C0F901E40FF51F4F5F5F4F79
+:107D7000E4915D98E093F100842F8F7311F4A09348
+:107D8000E80094E64617570730F390938C0181E0A2
+:107D9000089590938C0180E0089580E0089527EB8A
+:107DA00038E7F901849190E0C8CF1092E900809102
+:107DB000E80083FF61C082E991E068E0EADE82EFDB
+:107DC0008093E8008091920187FF05C08091E800D0
+:107DD00080FFFCCF03C08EEF8093E8008091930179
+:107DE000853051F48091E80080FFFCCF80919401B0
+:107DF00080688093E30039C08930E1F48091940178
+:107E000080938E01E7E2F8E791E031E026E390937A
+:107E1000E9003093EB0084918093EC002093ED0017
+:107E20009F5F3196953099F78EE78093EA00109224
+:107E3000EA001BC0883049F490918E015D9884E679
+:107E400080938C019093F10010C0882339F45D98E1
+:107E500084E680938C011092F10007C0863011F403
+:107E600032DF01C003DF882321F08EEF8093E8002A
+:107E7000089581E28093EB0008958091E1001092D3
+:107E8000E100282F83FF0CC01092E90081E080936D
+:107E9000EB001092EC0082E38093ED0010928E01D3
+:107EA00022FF1CC080918C01882331F08150809387
+:107EB0008C01882309F45D9A80918D01882331F02B
+:107EC000815080938D01882309F4289A80918F0135
+:107ED000882321F4109291011092900108951F932C
+:107EE000CF93DF9312E0C0E9D1E05FDFC6DF1093EC
+:107EF000E9008091E80085FF13C0289884E680930C
+:107F00008D019091F1008091E80085FD03C08BE622
+:107F10008093E800892F90E0DF91CF911F91089521
+:107F2000809190019091910101979093910180939C
+:107F300090018091900190919101892B09F426DDA7
+:0A7F4000CE010197F1F7FCDCD0CF71
+:087F4A0000E10000000000004E
:040000030000780081
:00000001FF
diff --git a/bootloaders/caterina/src/Platform.h b/bootloaders/caterina/src/Platform.h
index 37c26de..75e5bc3 100644
--- a/bootloaders/caterina/src/Platform.h
+++ b/bootloaders/caterina/src/Platform.h
@@ -14,7 +14,7 @@
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
#define DISABLE_JTAG() MCUCR = (1 << JTD) | (1 << IVCE) | (0 << PUD); MCUCR = (1 << JTD) | (0 << IVSEL) | (0 << IVCE) | (0 << PUD);
-#define USB_PID_LEONARDO_BOOTLOADER 0x0030
+#define USB_PID_LEONARDO_BOOTLOADER 0x008D
#define USB_PID_MICRO_BOOTLOADER 0x0031
#define USB_VID 0x2341 // arduino LLC vid
#define USB_PID ARDUINO_MODEL_PID // passed in by Makefile - 0x0034 for Leonardo, 0x0035 for MIcro
diff --git a/bootloaders/caterina/src/USBCore.cpp b/bootloaders/caterina/src/USBCore.cpp
index ac5d081..0eecacc 100644
--- a/bootloaders/caterina/src/USBCore.cpp
+++ b/bootloaders/caterina/src/USBCore.cpp
@@ -363,7 +363,9 @@ bool SendDescriptor()
#endif
} else if (USB_DEVICE_DESCRIPTOR_TYPE == t)
{
- desc_addr = (const uint8_t*)&USB_DeviceDescriptor;
+ if (setup.wLength == 8)
+ _cdcComposite = 1;
+ desc_addr = _cdcComposite ? (const uint8_t*)&USB_DeviceDescriptorA : (const uint8_t*)&USB_DeviceDescriptor;
}
else if (USB_CONFIGURATION_DESCRIPTOR_TYPE == t)
{
diff --git a/bootloaders/caterina/src/USBDesc.cpp b/bootloaders/caterina/src/USBDesc.cpp
index a634d4d..a84f3be 100644
--- a/bootloaders/caterina/src/USBDesc.cpp
+++ b/bootloaders/caterina/src/USBDesc.cpp
@@ -46,8 +46,8 @@ const uint16_t STRING_IMANUFACTURER[12] = {
'A','r','d','u','i','n','o',' ','L','L','C'
};
-
-DeviceDescriptor USB_DeviceDescriptor = D_DEVICE(0X02,0X00,0X00,64,USB_VID,USB_PID,0x100,0,IPRODUCT,ISERIAL,1);
+DeviceDescriptor USB_DeviceDescriptorA = D_DEVICE(0X02,0X00,0X00,64,USB_VID,USB_PID,0x100,0,IPRODUCT,ISERIAL,1);
+DeviceDescriptor USB_DeviceDescriptor = D_DEVICE(0x00,0x00,0x00,64,USB_VID,USB_PID,0x100,0,IPRODUCT,ISERIAL,1);
Config USB_ConfigDescriptor =
{