diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2012-04-09 08:03:56 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2012-04-09 08:03:56 -0400 |
commit | afedb5a92bac5c7f62a02ba085b4fff2b4f2070a (patch) | |
tree | ea3a3b6952ca2aaf602eee096a590be5746b491c /bootloaders/caterina | |
parent | ee611dc194fad72d2db9a901208577857365778f (diff) |
PID and VID are no longer hard-coded in bootloader. instead they are passed in at compile-time from makefile. also added and renamed built bootloader images for Micro and Leonardo
Diffstat (limited to 'bootloaders/caterina')
-rw-r--r-- | bootloaders/caterina/Caterina-Leonardo.hex (renamed from bootloaders/caterina/Caterina.hex) | 4 | ||||
-rw-r--r-- | bootloaders/caterina/Caterina-Micro.hex | 256 | ||||
-rwxr-xr-x | bootloaders/caterina/Descriptors.c | 12 | ||||
-rwxr-xr-x | bootloaders/caterina/Makefile | 13 |
4 files changed, 280 insertions, 5 deletions
diff --git a/bootloaders/caterina/Caterina.hex b/bootloaders/caterina/Caterina-Leonardo.hex index b3e1ed6..d7873af 100644 --- a/bootloaders/caterina/Caterina.hex +++ b/bootloaders/caterina/Caterina-Leonardo.hex @@ -242,8 +242,8 @@ :107F1000262FF999FECF1FBA92BD81BD20BD0FB6A5
:107F2000F894FA9AF99A0FBE01960895F894FFCF43
:107F30004341544552494E41007777000A00000002
-:107F40000000000801120110010200000841230195
-:107F50000701000201000109023E00020100803217
+:107F40000000000801120110010200000841233462
+:107F50000001000201000109023E0002010080321E
:107F6000090400000102020100052400100104249C
:107F700002040524060001070582030800FF090426
:107F80000100020A000000070504021000010705B5
diff --git a/bootloaders/caterina/Caterina-Micro.hex b/bootloaders/caterina/Caterina-Micro.hex new file mode 100644 index 0000000..7479210 --- /dev/null +++ b/bootloaders/caterina/Caterina-Micro.hex @@ -0,0 +1,256 @@ +:1070000055C000006EC000006CC000006AC00000E7
+:1070100068C0000066C0000064C0000062C00000DC
+:1070200060C000005EC00000F1C400005AC0000053
+:1070300058C0000056C0000054C0000052C00000FC
+:1070400050C0000078C000004CC000004AC00000E2
+:1070500048C0000046C0000044C0000042C000001C
+:1070600040C000003EC000003CC000003AC000002C
+:1070700038C0000036C0000034C0000032C000003C
+:1070800030C000002EC000002CC000002AC000004C
+:1070900028C0000026C0000024C0000022C000005C
+:1070A00020C000001EC000001CC0000011241FBE34
+:1070B000CFEFDAE0DEBFCDBF11E0A0E0B1E0E0E36A
+:1070C000FFE702C005900D92A83AB107D9F711E089
+:1070D000A8EAB1E001C01D92AE3BB107E1F78FD342
+:1070E00025C78ECFF89410926F00109281001092F5
+:1070F00085001092840081E085BF15BE47985D9A97
+:10710000289A0C94000008952091B2013091B301A7
+:107110002F5F3F4F3093B3012093B201932F37FF7E
+:1071200003C08EEF831B982F990F921710F4479886
+:107130000895479A08951F920F920FB60F92112447
+:107140002F938F939F93EF93FF931092850010924C
+:1071500084008091A8019091A901009741F00197C6
+:107160009093A9018093A801892B09F45D9A8091DD
+:10717000AA019091AB01009741F001979093AB0168
+:107180008093AA01892B09F4289AE0E0F0E0859128
+:1071900094918F5F9F4F49F08091AC019091AD0128
+:1071A00001969093AD018093AC01FF91EF919F9177
+:1071B0008F912F910F900FBE0F901F90189584E024
+:1071C0008093E9000DC08091E8008B778093E80000
+:1071D00003C08EB3882351F08091E80082FFF9CF7D
+:1071E0008091E80085FFEFCF8091F1000895982FFE
+:1071F00083E08093E9008091E80085FD0DC08091D7
+:10720000E8008E778093E80003C08EB3882369F08E
+:107210008091E80080FFF9CF9093F1005D9884E6BB
+:1072200090E09093A9018093A80108954F925F92F6
+:107230006F927F928F929F92AF92BF92CF92DF9286
+:10724000EF92FF920F931F93CF93DF9384E080938D
+:10725000E9008091E80082FF57C2289884E690E018
+:107260009093AB018093AA01AADF182F853481F493
+:107270008CE49DE19093AD018093AC0107B600FCD6
+:10728000FDCFF999FECF81E180935700E89503C0C7
+:10729000843519F494DF8DE00DC28C34E1F3803530
+:1072A000D1F3843721F484E4A2DF80E003C2813685
+:1072B00011F489E5FFC18134B1F481DF182F7FDF3C
+:1072C00090E0880F991FAA2797FDA095BA2F312F1C
+:1072D000330F20E0442737FD4095542F822B932B0A
+:1072E000A42BB52BB8C1803711F483E5E3C18335F6
+:1072F00049F4C0E0D1E089917ADF21E0C730D207BC
+:10730000D1F7D9C1863521F481E371DF80E3D2C1A1
+:10731000833731F487E86BDF85E969DF8EE1CAC125
+:107320008536B9F4E0E0F0E093E085E09093570013
+:10733000E89507B600FCFDCF80935700E89507B6A7
+:1073400000FCFDCFE058FF4FA0E7E030FA0771F7EF
+:10735000A2CF823739F4E1E0F0E089E08093570072
+:107360008491A8C1863439F4E0E0F0E089E08093AC
+:10737000570084919FC18E3439F4E3E0F0E089E056
+:1073800080935700849196C1813539F4E2E0F0E0B2
+:1073900089E08093570084918DC1823631F489E56C
+:1073A00026DF80E024DF80E885C1823419F087364B
+:1073B00009F0E5C01092AD011092AC0100DF082F7A
+:1073C000FEDEF82EFCDE682E8554823008F071C196
+:1073D000902F80E0CF2DD0E0C82BD92B10926F00DA
+:1073E000173609F04BC081E180935700E895DD2402
+:1073F000CC24C3943FC0E090AE01F090AF01009167
+:10740000B0011091B101B6E46B16D9F4ED2DF0E0A6
+:10741000EE29FF29E4918E2FEADEDD2081F082E063
+:1074200090E0A0E0B0E0E80EF91E0A1F1B1FE092FA
+:10743000AE01F092AF010093B0011093B101DC24D2
+:1074400018C0D801C701B695A7959795879558D5C7
+:10745000CEDE82E090E0A0E0B0E0E80EF91E0A1F68
+:107460001B1FE092AE01F092AF010093B0011093A8
+:10747000B1012197209709F0BECF7DC08090AE0169
+:107480009090AF01A090B001B090B10196E4691660
+:1074900009F05DC083E0F40180935700E89507B6DA
+:1074A00000FCFDCF54C0F6E46F1661F5772031F192
+:1074B000E090AE01F090AF010091B0011091B101E8
+:1074C0007EDED82ECC24852D90E08C299D29F701D5
+:1074D0000C0140925700E895112482E090E0A0E072
+:1074E000B0E0E80EF91E0A1F1B1FE092AE01F092F9
+:1074F000AF010093B0011093B10102C060DE582EBD
+:10750000742423C0E090AE01F090AF010091B0016F
+:107510001091B10116950795F794E79450DE682F06
+:10752000C701F6D48091AE019091AF01A091B00156
+:10753000B091B1010296A11DB11D8093AE0190934F
+:10754000AF01A093B001B093B101219704C05524BD
+:10755000772444244394209709F0A5CF96E4691634
+:1075600041F485E0F40180935700E89507B600FCEC
+:10757000FDCF8DE03CDE82E080936F009CC08334C1
+:1075800071F40091AE011091AF0119DE90E021E09D
+:10759000F8010C0120935700E89511247CCE833626
+:1075A00019F5E090AE01F090AF010091B00110919B
+:1075B000B10105DEF701E16090E021E00C012093CC
+:1075C0005700E895112482E090E0A0E0B0E0E80EDA
+:1075D000F91E0A1F1B1FE092AE01F092AF0100934B
+:1075E000B0011093B10157CE8D3661F4E091AE0138
+:1075F000F091AF0185E080935700E89507B600FC55
+:10760000FDCF49CE823551F4E091AE01F091AF014A
+:1076100005911491812FEBDD802F4CC0843421F52E
+:10762000E090AE01F090AF010091B0011091B10176
+:1076300016950795F794E794C2DD682FC70168D4C3
+:107640008091AE019091AF01A091B001B091B101D4
+:107650000296A11DB11D8093AE019093AF01A0933E
+:10766000B001B093B10117CE843609F5E090AE01B8
+:10767000F090AF010091B0011091B101D801C701A4
+:10768000B695A795979587953BD4B1DD82E090E0BC
+:10769000A0E0B0E0E80EF91E0A1F1B1FE092AE0149
+:1076A000F092AF010093B0011093B10104C08B318F
+:1076B00011F08FE39CDD83E08093E9009091E80076
+:1076C0008091E8008E778093E80095FF04C010C099
+:1076D0008EB38823C9F08091E80080FFF9CF8091B4
+:1076E000E8008E778093E80003C08EB3882361F0B2
+:1076F0008091E80080FFF9CF84E08093E9008091D9
+:10770000E8008B778093E800DF91CF911F910F9174
+:10771000FF90EF90DF90CF90BF90AF909F908F90B1
+:107720007F906F905F904F9008959091B601892F50
+:107730008F77813249F58091B7018032A1F0813293
+:1077400019F5913A09F58091E800877F8093E80068
+:107750008DE091E067E070E00AD28091E8008B77DD
+:107760008093E8000895913279F48091E800877F52
+:107770008093E8008DE091E067E070E05CD280915A
+:10778000E8008E778093E800089582E061EC42E0A3
+:10779000B4D083E061E842E1B0D084E060E842E147
+:1077A000ACC084B7877F84BF88E10FB6F89480931C
+:1077B0006000109260000FBE20E880E090E00FB6FD
+:1077C000F89420936100809361000FBE81E085BF33
+:1077D00092E095BF3F9A209A559AE1E6F0E0208327
+:1077E000108247985D9A289A109289008AEF8093B8
+:1077F000880090936F0083E080938100EFC01F9317
+:1078000088E10FB6F89480936000109260000FBE7C
+:1078100084B714BE182F10FF08C0E0E0F0E0859197
+:1078200094918F5F9F4F09F05DDC2091000A3091A9
+:10783000010A1092010A1092000A13FF0FC08091F2
+:10784000090190910A012817390741F0E0E0F0E0C2
+:10785000859194918F5F9F4F09F044DCA2DF78946B
+:107860001092AD011092AC010CC0E0DC37D38091D6
+:10787000AC019091AD0181549F4110F01092140120
+:1078800043DC80911401882381F78091E0008160BE
+:107890008093E00027DC80E090E01F910895FA01DA
+:1078A000923049F0933061F09130F9F485E191E044
+:1078B00022E130E01EC087E291E02EE330E019C003
+:1078C000882329F485E691E024E030E012C081307D
+:1078D00029F489E691E022E230E00BC0823029F4FD
+:1078E0008DE891E028E130E004C080E090E020E005
+:1078F00030E091838083C90108958093E9008091ED
+:10790000EB0081608093EB001092ED006093EC003F
+:107910004093ED008091EE00881F8827881F08950E
+:107920008091B60188238CF403C08EB38823B1F014
+:107930008091E80082FFF9CF8091E8008B778093F7
+:10794000E80008958EB3882349F08091E80080FF15
+:10795000F9CF8091E8008E778093E8000895EF9248
+:10796000FF920F931F9345D04CD008ED10E0F80123
+:1079700080818F77808380818068808380818F7D04
+:10798000808319BC1EBA1092B40180EEE82EF12C4F
+:10799000F70180818B7F8083F80180818160808303
+:1079A00080E060E042E0A9DFE1EEF0E080818E7FE0
+:1079B0008083E2EEF0E08081816080838081886056
+:1079C0008083F70180818E7F8083F80180818061D0
+:1079D00080831F910F91FF90EF900895E7EDF0E005
+:1079E0008081816080838AE482BF81E08093B501D9
+:1079F000B6CFE8EDF0E080818E7F80831092E200C8
+:107A000008951092DA001092E10008951F920F92EB
+:107A10000FB60F9211242F933F934F935F936F9361
+:107A20007F938F939F93AF93BF93EF93FF93809137
+:107A3000DA0080FF1BC08091D80080FF17C08091C2
+:107A4000DA008E7F8093DA008091D90080FF0BC02E
+:107A500080E189BD82E189BD09B400FEFDCF81E0EE
+:107A60008EBB3BD203C019BC1EBA37D28091E10055
+:107A700080FF17C08091E20080FF13C08091E20078
+:107A80008E7F8093E2008091E20080618093E2002B
+:107A90008091D80080628093D80019BC85E08EBBAD
+:107AA0001CD28091E10084FF2CC08091E20084FF11
+:107AB00028C080E189BD82E189BD09B400FEFDCF07
+:107AC0008091D8008F7D8093D8008091E1008F7ED7
+:107AD0008093E1008091E2008F7E8093E2008091AC
+:107AE000E20081608093E2008091B401882331F448
+:107AF0008091E30087FD02C081E001C084E08EBB7D
+:107B0000ECD18091E10083FF21C08091E20083FFEE
+:107B10001DC08091E100877F8093E10082E08EBBF1
+:107B20001092B4018091E1008E7F8093E1008091FA
+:107B3000E2008E7F8093E2008091E200806180937A
+:107B4000E20080E060E042E0D8DEC7D1FF91EF9133
+:107B5000BF91AF919F918F917F916F915F914F9165
+:107B60003F912F910F900FBE0F901F9018959C0181
+:107B70004091BC015091BD014617570718F4F90117
+:107B800090E044C06115710511F0AB01F8CF809110
+:107B9000E8008E778093E80040E050E0F0CF8EB3AD
+:107BA000882309F444C0853009F443C08091E8007B
+:107BB00083FF02C081E008958091E80082FD31C01A
+:107BC0008091E80080FF22C08091F3009091F20044
+:107BD000782F60E0292F30E0262B372B07C08191CA
+:107BE0008093F100415050402F5F3F4F41155105A8
+:107BF00019F02830310598F390E02830310509F468
+:107C000091E08091E8008E778093E800411551055E
+:107C100031F6992321F605C08EB3882341F08530D3
+:107C200041F08091E80082FFF7CF80E0089582E084
+:107C3000089583E008959C016115710529F48091F0
+:107C4000E8008B778093E800F90126C08EB3882383
+:107C500091F1853091F18091E80083FF02C081E0CD
+:107C600008958091E80082FFF1CF06C08091F10075
+:107C700081936150704059F02091F3008091F2009F
+:107C8000322F20E090E0822B932B892B79F7809183
+:107C9000E8008B778093E80061157105B9F605C09F
+:107CA0008EB3882341F0853041F08091E80080FF59
+:107CB000F7CF80E0089582E0089583E008950F9360
+:107CC0001F93DF93CF9300D0CDB7DEB7E6EBF1E0A3
+:107CD0008091F100819381E0EE3BF807C9F725DD43
+:107CE0008091E80083FFE4C08091B6019091B701D4
+:107CF000953009F46DC0963040F4913081F19130A7
+:107D000070F0933009F0D4C02AC0983009F4A3C0B1
+:107D1000993009F4B2C0963009F0CAC07CC08038EE
+:107D200009F4C6C0823809F0C3C08091BA018770D7
+:107D30008093E9008091EB001092E9002091E80027
+:107D4000277F2093E80090E025E0969587952A9577
+:107D5000E1F781708093F1001092F10087C08823D1
+:107D600019F0823009F0A4C08F71823009F0A0C0F0
+:107D70008091B801882331F52091BA01277009F468
+:107D800097C02093E9008091EB0080FF1BC09330E7
+:107D900021F48091EB00806213C08091EB00806140
+:107DA0008093EB0081E090E002C0880F991F2A9534
+:107DB000E2F78093EA001092EA008091EB0088607D
+:107DC0008093EB001092E9008091E800877F51C01A
+:107DD000882309F06DC01091B8011F770FB7F89490
+:107DE0008091E800877F8093E8009ADD8091E80029
+:107DF00080FFFCCF8091E3008078812B8093E300AB
+:107E000080688093E300112311F482E001C083E0D5
+:107E10008EBB0FBF4DC08058823008F049C08091A2
+:107E2000B8019091B9016091BA01AE014F5F5F4F07
+:107E300036DDBC01009709F43BC08091E800877FE4
+:107E40008093E80089819A8192DE8091E8008B77A7
+:107E50008093E8002DC0803859F58091E800877F35
+:107E60008093E8008091B4018093F1008091E80054
+:107E70008E778093E80054DD1BC08823C9F490916D
+:107E8000B8019230A8F48091E800877F8093E800E1
+:107E90009093B40145DD8091B401882331F4809141
+:107EA000E30087FD02C081E001C084E08EBB6DDC91
+:107EB0008091E80083FF0AC08091EB00806280938C
+:107EC000EB008091E800877F8093E8000F900F908F
+:107ED000CF91DF911F910F91089508951F938EB355
+:107EE000882361F01091E9001092E9008091E80088
+:107EF00083FF01C0E4DE17701093E9001F9108951D
+:107F0000F999FECF92BD81BDF89A992780B5089561
+:107F1000262FF999FECF1FBA92BD81BD20BD0FB6A5
+:107F2000F894FA9AF99A0FBE01960895F894FFCF43
+:107F30004341544552494E41007777000A00000002
+:107F40000000000801120110010200000841233561
+:107F50000001000201000109023E0002010080321E
+:107F6000090400000102020100052400100104249C
+:107F700002040524060001070582030800FF090426
+:107F80000100020A000000070504021000010705B5
+:107F900083021000010403090422034100720064FB
+:107FA00000750069006E006F0020004D00690063DD
+:107FB0000072006F00200020002000000018034124
+:107FC0000072006400750069006E006F0020004CB4
+:087FD000004C0043000000001A
+:040000030000700089
+:00000001FF
diff --git a/bootloaders/caterina/Descriptors.c b/bootloaders/caterina/Descriptors.c index f1756e2..824e0dd 100755 --- a/bootloaders/caterina/Descriptors.c +++ b/bootloaders/caterina/Descriptors.c @@ -53,8 +53,8 @@ const USB_Descriptor_Device_t DeviceDescriptor = .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
- .VendorID = 0x2341,
- .ProductID = 0x0701,
+ .VendorID = DEVICE_VID,
+ .ProductID = DEVICE_PID,
.ReleaseNumber = VERSION_BCD(00.01),
.ManufacturerStrIndex = 0x02,
@@ -193,7 +193,13 @@ const USB_Descriptor_String_t ProductString = {
.Header = {.Size = USB_STRING_LEN(16), .Type = DTYPE_String},
- .UnicodeString = L"Arduino Leonardo"
+ #if DEVICE_PID == 0x0034
+ .UnicodeString = L"Arduino Leonardo"
+ #elif DEVICE_PID == 0x0035
+ .UnicodeString = L"Arduino Micro "
+ #else
+ .UnicodeString = L"USB IO board "
+ #endif
};
/*
const USB_Descriptor_String_t SerialNumString =
diff --git a/bootloaders/caterina/Makefile b/bootloaders/caterina/Makefile index ef583bc..3ec7b14 100755 --- a/bootloaders/caterina/Makefile +++ b/bootloaders/caterina/Makefile @@ -46,6 +46,17 @@ # To rebuild project do "make clean" then "make all".
#----------------------------------------------------------------------------
+# USB vendor ID (VID)
+# official Arduino LLC VID
+VID = 0x2341
+
+
+# USB product ID (PID)
+# official Leonardo PID
+#PID = 0x0034
+# official Micro PID
+PID = 0x0035
+
# MCU name
MCU = atmega32u4
@@ -193,6 +204,8 @@ CDEFS = -DF_CPU=$(F_CPU)UL CDEFS += -DF_USB=$(F_USB)UL
CDEFS += -DBOARD=BOARD_$(BOARD) -DARCH=ARCH_$(ARCH)
CDEFS += -DBOOT_START_ADDR=$(BOOT_START)UL
+CDEFS += -DDEVICE_VID=$(VID)UL
+CDEFS += -DDEVICE_PID=$(PID)UL
CDEFS += $(LUFA_OPTS)
|