Skip to content
Snippets Groups Projects
Commit f9ed436e authored by Cristian Maglie's avatar Cristian Maglie Committed by Sandeep Mistry
Browse files

Added support for MKRZero

parent e8a08304
No related branches found
No related tags found
No related merge requests found
Showing
with 1390 additions and 0 deletions
......@@ -132,3 +132,32 @@ mkr1000.build.vid=0x2341
mkr1000.build.pid=0x804e
mkr1000.bootloader.tool=openocd
mkr1000.bootloader.file=mkr1000/samd21_sam_ba_arduino_mkr1000.bin
# Arduino MKRZero
# ---------------
mkrzero.name=Arduino MKRZero
mkrzero.vid.0=0x2341
mkrzero.pid.0=0x804f
mkrzero.vid.1=0x2341
mkrzero.pid.1=0x004f
mkrzero.upload.tool=bossac
mkrzero.upload.protocol=sam-ba
mkrzero.upload.maximum_size=262144
mkrzero.upload.use_1200bps_touch=true
mkrzero.upload.wait_for_upload_port=true
mkrzero.upload.native_usb=true
mkrzero.build.mcu=cortex-m0plus
mkrzero.build.f_cpu=48000000L
mkrzero.build.usb_product="Arduino MKRZero"
mkrzero.build.usb_manufacturer="Arduino LLC"
mkrzero.build.board=SAMD_MKR1000
mkrzero.build.core=arduino
mkrzero.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags}
mkrzero.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
mkrzero.build.openocdscript=openocd_scripts/arduino_zero.cfg
mkrzero.build.variant=mkrzero
mkrzero.build.vid=0x2341
mkrzero.build.pid=0x804f
mkrzero.bootloader.tool=openocd
mkrzero.bootloader.file=mkrzero/samd21_sam_ba_arduino_mkrzero.bin
File added
:10000000FC7F00204D0600003D0600004106000078
:1000100000000000000000000000000000000000E0
:100020000000000000000000000000004506000085
:1000300000000000000000004906000081070000E9
:1000400010B5064C2378002B07D1054B002B02D0AE
:10005000044800E000BF0123237010BD5C000020B5
:10006000000000000C19000008B5084B002B03D05D
:100070000748084900E000BF07480368002B03D089
:10008000064B002B00D0984708BDC046000000007A
:100090000C19000060000020580000200000000043
:1000A000154A164B1178002909D115491878097895
:1000B0004118C9B2197080201249400008601178B7
:1000C0000131C9B211701978F02902D819780929BB
:1000D00009D80B4908784042C0B2087018780978EE
:1000E0004118C9B2197012781B789A4203D1802244
:1000F000044B52001A607047780000200100002075
:10010000000000209C44004110B5C3699C07FCD44A
:1001100003680224A3430360C46901231C42FBD18A
:100120000468234303600368DC07FCD4C46901232B
:100130001C42FBD1C469DC401C42F7D1084B1A4376
:100140000260C3695A07FCD4C0239B0243608181CB
:10015000C3699C07FCD4036802221343036010BDEB
:1001600004000040037EDA07FCD5018570470000DB
:10017000027E01235107FBD5428B1A4207D1428BE5
:10018000DA401A4203D1428B92081A4202D0034B42
:1001900001221A70008DC0B27047C046790000205D
:1001A00070B50368041C988B1A1C0821FF320842A2
:1001B00028D0988B174D0143802099839872112382
:1001C00053704021144B917150715E68C0202E40D5
:1001D000800506435E605E693540284358610F48DC
:1001E00018600F4818615D680E4828408025AD02F0
:1001F000284358605868800B800358600023517171
:10020000237105E0137ADA0602D5201C00F0F2FA19
:10021000207970BDFFFFFF8F98010020980000201B
:1002200018010020FF3F00F0002303714371044BCD
:10023000016083600B78022213430B707047C04645
:10024000A101000038B5364B2021DA6901200A43AC
:10025000DA61344B06241A7802431A70324B0F22AB
:100260001978914319701978214319702F490C7826
:100270002043087019780A401A701A7860210A43DE
:100280001A702B4B2B4A5A805A7852B2002AFBDB49
:10029000294B01211A780A431A709A78D107FCD4A5
:1002A00026480268510B1F221140914200D10521BE
:1002B00011408C011D8D2249294021431985046874
:1002C000A10C0A401F2A00D11D221C8D1F210A40AB
:1002D0008C4322431A8502680721D20D0A408A42C4
:1002E00000D103220A40188D1103164A02400A4326
:1002F0001A8519787F220A401A701A780421124848
:100300000A431A7058621A890C218A431A811A8981
:1003100001218A431A810021802201F076F938BD3B
:1003200000040040584400413C440041594400410D
:10033000000C004006400000005000412460800096
:100340003FF8FFFFFF8FFFFF98010020F7B5141C57
:10035000234A5F0101971D1CD319061C5869271CED
:100360004000400F03301033C74006D00F1C8022DE
:10037000596812060A435A6009E02F1C7B1E9F41F0
:10038000184BBF01FF18381C221C01F035F90199E8
:100390001348083542181761131C5269A104920BC7
:1003A000890C92030A435A6159690F4A02200A4094
:1003B0005A616B01F318D979032211400143D879AE
:1003C0009043021C0A43DA715979802252420A434F
:1003D0005A716B01F318DB799A07FAD5201CFEBD20
:1003E0009801002018010020FF3F00F0F8B51E4ED4
:1003F000041C3378151C002B12D11C4B1C4A1A64A8
:100400005A6C920B92035A64586C1A4A02405A640E
:10041000A2235B00E25C40200243E25401233370DC
:100420004827FF37E25D012313401AD00F4B5A6C67
:100430009204920CAA4202D25D6CAD04AD0C081C71
:100440002A1C0B4901F0D8F8E25D03231A40012170
:100450000A43E15D99430B1C1343E35500233370BA
:1004600000E01D1C281CF8BD7A0000209801002027
:10047000D8000020FF3F00F0FF30827930239A43FC
:10048000131C2022002900D11022134383717047CE
:100490000C4BFF305A690221920B92035A61027A87
:1004A00003231A400A43017A99430B1C1343037236
:1004B000827980235B4213438371037A9A07FCD5C8
:1004C0007047C0469801002080235B421943C9B29F
:1004D0008172704770B5A02303225B00C254134B96
:1004E000134A5C6CC021144089050C4346255C64AA
:1004F000FF35402444550F4D30261D6490256D0076
:1005000046555D6B15402943922559636D00802146
:100510004155094D1D63B0256D0044555C6F224067
:100520005A67B2235B00C15470BDC04698010020D9
:10053000FFFFFF8FD80000205801002030B5364A59
:100540001E235168082099430223194351603349FF
:100550008A6902438A613248324A9082908A034310
:100560009382D3689807FCD52F4B01201870187818
:10057000C40704D52C48407840B20028F7DB01209E
:100580009860587840B20028FBDB284C264844602D
:10059000587840B20028FBDB82242348E4014480E1
:1005A000587840B20028FBDB908C8024A0439084D4
:1005B000D068C506FCD51E4C1A48C462D4681948D8
:1005C000E506FBD5848C1B4D2C438484D4681548E8
:1005D000E506FBD5848C02252C438484D068040670
:1005E000FCD51048C0684506F8D5D068C406FCD5CF
:1005F00000229A605A7852B2002AFBDB0E480A4A5F
:1006000050605A7852B2002AFBDB00230B724B7207
:100610008B72CB7230BDC0460040004100040040E8
:100620000C06000000080040000C0040010501001D
:10063000B805FF7D040A0000000703000EBEFEE7B8
:100640000DBEFEE705BEFEE702BEFEE70E4A0F48FE
:1006500038B5824204D10E4A0E4B93420ED10AE0C5
:100660000D4C9442F7D00023D1188842F3D9E558B5
:1006700004330D60F8E700F011F804E09342FAD279
:10068000002102C3FAE7FEE7000000205C00002022
:10069000A40300205C000020101900002E4A38B589
:1006A0001368141C01331ED0D1B200291BD12B4B6F
:1006B0001878012318402A4B0AD11D6829498D4218
:1006C00001D118600FE01960274901390029FCD1D8
:1006D0001960236883F30888FF239A43234B9A60A9
:1006E0001D4B5B681847FFF729FF62B600F0B2FDAB
:1006F00000F04CF81E4B802252001A601D4B1E4A1F
:10070000041C5A60194AC021106A09060002000A36
:100710000143116200229A6007221A60A368201C1C
:100720009847164B002801D001221A701A78002A27
:1007300005D0002000F0A0FA00F018FBFCE71B78C1
:10074000002BEBD100F0FAFD0028E7D0012000F0EB
:1007500093FA00F00BFBFCE7002000003804004097
:10076000FC7F00203581730748E8010000ED00E0C0
:100770008844004110E000E0E70300007B00002017
:1007800008B5FFF78DFC00F0DBFA08BD10B5054B8E
:10079000054C2360FFF756FD201C2168FFF744FD40
:1007A000201C10BD005000411802002070B5051C2F
:1007B000C0B0081C161C0C1C00F02FFF40006A463D
:1007C000032302305370107076080123E218013AB7
:1007D00011785A00002906D1281C69460023FFF72A
:1007E000B5FD40B070BDB342F6DA684681520133C0
:1007F000ECE70000F7B50468051C201CFF30037A05
:10080000AF4A10210B430372AE4F1378AE493B70D1
:100810005378AE4E0B7093783380D17833880902C9
:100820000B4333801179AA4B198051791F88090233
:100830000F431F809779A7490F80D2790F88120242
:100840003A430A80402242719F489E4F027838788E
:1008500012020243A0480F1C8446181C624500D1B6
:10086000C2E020DC802149008A4200D185E109DC18
:10087000812A00D192E0822A00D195E0802A00D01E
:100880007BE18BE081235B009A4200D1D5E000DA66
:100890006FE1C0239B009A4200D16EE18F4B9A42D8
:1008A00000D166E169E190231B019A4269D015DC11
:1008B000D023DB009A4222D088231B019A4269D0C0
:1008C000A023DB009A4200D057E1201CFFF7E0FD97
:1008D0003188286889B2FFF7F7FD52E1804B9A42D0
:1008E00000D146E100DC48E17E4B9A4200D134E180
:1008F0007D4B9A4200D040E133886B7139E13388F7
:100900001B0A012B08D10B8812222868934201D8B8
:100910000A8892B2754928E133881B0A022B08D154
:100920000B8843222868934201D80A8892B2704902
:100930001BE133881B0A032B00D01EE13388DBB296
:10094000012B17D0002B07D0022B00D015E10A880D
:100950002868D2B2674911E0042201A8664900F074
:100960004BFE3B8804222868934201D83A8892B211
:1009700001A9FAE00A8828686049D2B2FFF716FF99
:10098000FFE03388201C2B71FFF782FD201CFFF74E
:10099000A1FDF6E0291C01C90122E6E05849002327
:1009A0000B8028680222E1E0554900220A8018885D
:1009B00050221040534A10701E880F20304018807B
:1009C0001888032800D9D8E012781B8808335B0107
:1009D000E418A379002A01D09B0600E0DB06DB0FB8
:1009E0000B8028680222C0E019887F229143454A83
:1009F000C9B2117018880F2101401980318800296F
:100A000000D0BAE01988002900D1B6E0198803297E
:100A100000D9B2E012781B8808335B01E318002A82
:100A200004D05A7930218A43202103E05A793021B9
:100A30008A4310210A435A719BE002887F239A431C
:100A4000304BD2B21A7001880F220A4002803288DD
:100A5000002A00D091E00288002A00D18DE00288AF
:100A6000032A00D989E01B78002B4DD00388083376
:100A70005B01E3189B799A0600D47AE00388302161
:100A800008335B01E3181A798A4320210A431A715B
:100A9000038808335B01E318DB795F0669D50388B7
:100AA000602108335B01E318DA798A4340210A4365
:100AB000DA710388022208335B01E3184BE0C04679
:100AC00098000020860000207E000020800000208A
:100AD00082000020840000200203000001030000C7
:100AE00021200000A121000021220000601600004A
:100AF00004000020501600004016000044160000BC
:100B00007C00002087000020038808335B01E31885
:100B10009B79D9062DD50388302108335B01E31872
:100B20001A798A4310210A431A71038808335B013A
:100B3000E318DB799A061CD50388602108335B0132
:100B4000E318DA798A4320210A43DA710388012203
:100B500008335B01E3181A710BE00B880822286840
:100B6000934201D80A8892B206490023FFF7EEFBB0
:100B700007E0201CFFF78CFC03E0201C0121FFF79D
:100B80007BFCF7BD4800002007B5054B0122019012
:100B900001A91868131CFFF7D9FB01200EBDC04640
:100BA0001802002013B5054B6C4607341868211C49
:100BB0000122FFF71BFC207816BDC046180200205A
:100BC00010B5074C201CFFF7EBFA031C00208342F2
:100BD00005D022684823FF33D05C0123184010BDA4
:100BE0001802002010B5054A0C1C031C191C1068C3
:100BF0000123221CFFF7AAFB201C10BD18020020B5
:100C000070B5084C061C201C0D1CFFF7C9FA002308
:100C1000984205D02068311C2A1CFFF7E7FB031C13
:100C2000181C70BD18020020F8B50C4C051C201CC7
:100C30000E1CFFF7B5FA0023271C341C98420AD07B
:100C4000002C07D0291C221C3868FFF7CFFB241A80
:100C50002D18F5E7331C181CF8BDC04618020020FB
:100C600008B5031C081C111C9847024B64221A800B
:100C700008BDC04692000020012805D1054B064A58
:100C80001A60064B187004E0002802D1044A014B98
:100C90001A6070478802002094160000940000201B
:100CA000E016000030B50A1C1C4985B00978031C09
:100CB00000292AD0042A01D1006804E0022A01D1C7
:100CC000008800E00078520004A98B180B3B9C1AA6
:100CD000A3420BD00F210140092902D83025294316
:100CE00000E0373119700009013BF1E701A9302319
:100CF0000B7078234B700A208B1898700D20D870D9
:100D0000074B04321B68D86803E005490968C868C6
:100D1000191CFFF7A5FF05B030BDC04688000020B4
:100D20008802002072B6EFF30883044A1360036858
:100D300083F30888436818477047C0468C02002038
:100D4000084B1A88002A03D01A88013A92B21A80F6
:100D5000054B1A88002A03D01A88013A92B21A80E9
:100D60007047C0469200002090000020F0B591B07E
:100D700008A9CC4A0B1C31CA31C351CA51C360CA3D
:100D800060C3C94BC9489A687A255203520F920032
:100D90005258C74902609C68A4B262430C60C549BE
:100DA00000240A60C44A1460C44C2570C44CC54D6C
:100DB0002368281C1B6940219847002802D0C24B99
:100DC00064221A80C14B00221860C14B1D60C14BC8
:100DD000C04DBE4F1A602A683B689A42E6D2BC4BAF
:100DE0001B681A78FF2A00D114E2232A00D0EBE115
:100DF000B94E3378002B06D0B14BB8491B6802229C
:100E0000D868FFF72DFFAD4B1B78532B3CD13B68C7
:100E10002A6893421ED9AE4801322A609A1AB04B12
:100E200001681B6801310160AE4E9A4201D2326006
:100E300000E03360A04832680068049000F0DCFBFA
:100E4000336829685A182A60A14A1668F118116097
:100E5000A54A13702B68013B2B609D4B1A68013A21
:100E60001A60A14B9E4A1B7811688B420AD22268F5
:100E70009148C91A006892699047002802D0924BA5
:100E800064221A80C0468DE1522B0AD18A48944AC6
:100E90002368006811685B69039098476422934B4C
:100EA0000DE04F2B05D1844B8D4A1B6812681A70D8
:100EB00078E1482B05D1804B894A1B6812681A805B
:100EC00070E1572B05D17C4B854A1B6812681A606C
:100ED00068E16F2B03D1784B0121186807E0682B7C
:100EE00008D1754B7E481B6802211B880360FFF701
:100EF000D9FE57E1772B06D16F4B79481B68042147
:100F00001B680360F3E7472B13D1754B1868FFF795
:100F100009FF774B1B6883F3088862B6754B1B7813
:100F2000002B00D13EE1664B06201B681B689847EA
:100F300038E1542B04D101233370614B1B6864E00A
:100F40004E2B0CD13378002B06D15D4B63491B68C7
:100F50000222D868FFF784FE0023337022E1562B6B
:100F600057D123686449D8680122FFF779FE2368C6
:100F70006249D8680322FFF773FE614D2368291C7C
:100F8000D8680122FFF76CFE23685E49D8680D22FD
:100F9000FFF766FE2368291CD8680122FFF760FE70
:100FA0004B4F4C4D5849002339602B603A1C281C8C
:100FB00013685E1C16601B780593002B03D0036832
:100FC00001330360F4E73E4E2A683368D868FFF7C0
:100FD00047FE33684A49D8680122FFF741FE059968
:100FE00029604A4939603A4A1368581C10601B78D6
:100FF000002B04D0374B1A6801321A60F3E73368CC
:101000002A68D868FFF72CFE3368D8683349022273
:10101000C6E0334A582B17D1244E264D3668136844
:101020002A68B10093420AD21F4D5808E861384837
:1010300028801D4D287DC607FBD55B18F2E7204BA5
:1010400034491B68D868AAE0592B79D112681A4B29
:101050003149002A02D11B680B606CE0124D086810
:1010600019686B68104E8025AB4392087360002AA4
:1010700061D02A4B0C4D2B800B4E337DDD07FBD509
:1010800000230A4D2D680195AD08AB4203D3244DD2
:10109000054E358046E09342F9D09D004659013314
:1010A0004E51EEE77416000000400041400200205F
:1010B0003802002034020020840200203002002088
:1010C0008802002044020020900000202802002016
:1010D0002C0200203C02002088000020D4160000D2
:1010E00090020020940200202402002092000020A0
:1010F0008C02002094000020B0160000D9160000D9
:10110000B2160000FC160000B4160000C016000065
:1011100002A5FFFFC91600008C00002044A5FFFFB8
:1011200004A5FFFF3F4E357DEE07FBD59D00491915
:101130004019D21A9BE73C4B3C491B68D8682EE00B
:101140005A2B2FD13A4B17681D680026EF19BD4264
:1011500006D02878311C00F013F90135061CF6E79B
:10116000314B34491B680122D868FFF779FD07230A
:101170000F223240111C36093031092A00DD0731B7
:101180001820C0186A468154013BF1D2236806A991
:10119000D8680822FFF764FD23682749D86803222E
:1011A000FFF75EFD254B7A221A70254B00221A604C
:1011B000244B1B7893422DD01B4B23491B680122E3
:1011C000D868FFF74DFD25E0111C3039C8B21C4B23
:1011D000092804D81D682A01114319601AE0111C5E
:1011E0004139052903D81E68373A310106E0111C40
:1011F0006139052904D81868573A01010A4308E003
:101200002C2A03D10A4A1968116001E00B490A70BF
:1012100000221A600D4B1A6801321A600C4B1A68D2
:101220000132D5E50040004188020020CD160000C3
:1012300084020020D1160000D316000030020020E6
:101240009002002088000020D71600003C020020F9
:101250002C02002010B51C4B01201A7803240243F5
:101260001A701A4B0F22197891431970197821437B
:10127000197017490C782043087019780A401A70C1
:101280001A7830210A431A70124B80211A6A0A43D5
:101290001A62114B114A5A805A7852B2002AFBDB6B
:1012A000C4220F480F499203FEF72EFF0E4A002377
:1012B00013700E4A13700E4A13700E4A13700E4AC2
:1012C00013700E4A137010BDD6440041BB44004158
:1012D000D744004100040040000C004019400000C9
:1012E000001C00422AF60000980200201F03002084
:1012F000990200209C020020200300201D030020F2
:1013000008B5C1B20248FEF72DFF012008BDC04656
:10131000001C0042024B187E4007C00F7047C046B9
:10132000001C004208B5FFF7F5FF0028FBD002487B
:10133000FEF71EFF08BDC046001C004208B5FFF7BF
:10134000E9FF0023984205D0FFF7ECFF031C233B85
:101350005A425341181C08BD70B5041C0D1C461898
:10136000B44204D02078FFF7CBFF0134F8E7281C03
:1013700070BD10B5041CFFF7D5FF2070012010BD13
:101380000B0A5840034B4000C05A0902484080B243
:101390007047C0460A170000F7B50024051C0F1C53
:1013A000261CBC4220D0FFF7BDFF114BC0B21B78FA
:1013B0000190002B1AD1311CFFF7E2FF0D4B061CE8
:1013C0001A88002A04D10C4A11782A1C002907D057
:1013D00001996A1C2970802F02D11988013919805E
:1013E0000134A4B2151CDCE7301C00E00120FEBD76
:1013F0001D0300209A0200201E030020F0B53E4E7F
:1014000085B0002203900C1C32703C4B914201D1FC
:10141000012201E03A490C801A707F231C4201D05E
:1014200080349C43FFF77EFF3378C0B2002B07D097
:1014300000253570FFF776FF3378C0B2AB4236D166
:10144000432803D0712853D01528EBD101230093F2
:101450000120FFF755FF0098FFF752FF0099802504
:10146000C843C0B2FFF74CFF039B00270293244AF6
:101470001388002B1DD1214901930978002918D127
:101480000198FFF73DFF391C0198FFF779FF013DF7
:10149000071C002DEBD1000AC0B2FFF731FFF8B2F4
:1014A000FFF72EFFFFF73EFF3378002B0AD0357091
:1014B0001FE00299013B09781380029B01910133DF
:1014C0000293DDE7C0B2062807D1009B03990133E0
:1014D000DBB280310093803C0391002CB8D1042012
:1014E000FFF70EFFFFF71EFF044B01251C7000E005
:1014F0000025281C05B0F0BD1D0300201E030020A0
:101500009A020020F0B5384C87B000230190237078
:10151000994201D1012301E0344A1180344A642602
:1015200013704320FFF7ECFE324FFFF7F3FE002865
:1015300003D1002F03D0013FF7E7002F03D1013E75
:10154000002EEED14DE00125FFF7ECFE2378002BB5
:1015500038D1C0B20290012805D004283DD1062020
:10156000FFF7CEFE39E005AE0221301CFFF714FF75
:1015700001988021FFF710FF23780390002B18D1EA
:10158000FFF7D0FE0702FFF7CDFEBFB223783F186A
:10159000BFB2012B0DD0039B9F4207D13378AB42E2
:1015A00004D1EB437278DBB29A4204D01820FFF7E3
:1015B000A7FE002303E00620FFF7A2FE029B22788D
:1015C000002A02D0002626700BE0012B05D1019ADB
:1015D0006B1C8032DDB20192B6E7054A002313701E
:1015E0000126301C07B0F0BD1D0300209A02002028
:1015F0001E03002000350C0010B50023934203D0D9
:10160000CC5CC4540133F9E710BD031C821893422B
:1016100002D019700133FAE770470023C25C01332E
:10162000002AFBD1581E7047F8B5C046F8BC08BC6C
:101630009E467047F8B5C046F8BC08BC9E46704749
:101640000403090441726475696E6F204C4C4300B9
:1016500041726475696E6F204D4B525A65726F000E
:10166000120100020200004041234F00000201026B
:101670000001000008000000100000002000000031
:101680004000000080000000000100000002000097
:1016900000040000011300002513000015130000D2
:1016A0005913000073130000FD130000051500001E
:1016B000760020004F637420323020323031360003
:1016C00031353A32303A343700580A0D00590A0D94
:1016D000005A00230A0D003E00322E3000000000A8
:1016E000890B0000A50B0000C10B0000E50B0000FA
:1016F000010C0000E50B0000290C00005B41726446
:1017000075696E6F3A58595A5D00000021104220E9
:1017100063308440A550C660E770088129914AA1D2
:101720006BB18CC1ADD1CEE1EFF131121002733249
:101730005222B5529442F772D662399318837BB322
:101740005AA3BDD39CC3FFF3DEE3622443342004D9
:101750000114E664C774A44485546AA54BB5288572
:101760000995EEE5CFF5ACC58DD553367226111629
:101770003006D776F6669556B4465BB77AA71997C2
:101780003887DFF7FEE79DD7BCC7C448E5588668B1
:10179000A7784008611802282338CCC9EDD98EE912
:1017A000AFF9488969990AA92BB9F55AD44AB77A89
:1017B000966A711A500A333A122AFDDBDCCBBFFB62
:1017C0009EEB799B588B3BBB1AABA66C877CE44C99
:1017D000C55C222C033C600C411CAEED8FFDECCDB2
:1017E000CDDD2AAD0BBD688D499D977EB66ED55E69
:1017F000F44E133E322E511E700E9FFFBEEFDDDF02
:10180000FCCF1BBF3AAF599F788F8891A981CAB18D
:10181000EBA10CD12DC14EF16FE18010A100C230BF
:10182000E3200450254046706760B9839893FBA37A
:10183000DAB33DC31CD37FE35EF3B1029012F3220F
:10184000D2323542145277625672EAB5CBA5A895CA
:1018500089856EF54FE52CD50DC5E234C324A0145F
:1018600081046674476424540544DBA7FAB799875A
:10187000B8975FE77EF71DC73CD7D326F2369106AF
:10188000B01657667676154634564CD96DC90EF9A2
:101890002FE9C899E9898AB9ABA9445865480678FF
:1018A0002768C018E1088238A3287DCB5CDB3FEBBA
:1018B0001EFBF98BD89BBBAB9ABB754A545A376A4F
:1018C000167AF10AD01AB32A923A2EFD0FED6CDD8A
:1018D0004DCDAABD8BADE89DC98D267C076C645C9F
:1018E000454CA23C832CE01CC10C1FEF3EFF5DCF9A
:1018F0007CDF9BAFBABFD98FF89F176E367E554EEF
:10190000745E932EB23ED10EF01E00000000000067
:1019100001140000090243000201008032090400A2
:101920000001020200000524001001042402000549
:10193000240600010524010001070583030800FFB8
:1019400009040100020A00000007058102400000AE
:10195000070502024000000000C20100000008006C
:0C196000690000004100000000000000D1
:040000030000064DA6
:00000001FF
......@@ -25,6 +25,8 @@
#include "board_definitions_arduino_mkr1000.h"
#elif defined(BOARD_ID_genuino_mkr1000)
#include "board_definitions_genuino_mkr1000.h"
#elif defined(BOARD_ID_arduino_mkrzero)
#include "board_definitions_arduino_mkrzero.h"
#else
#error You must define a BOARD_ID and add the corresponding definitions in board_definitions.h
#endif
......
/*
Copyright (c) 2016 Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _BOARD_DEFINITIONS_H_
#define _BOARD_DEFINITIONS_H_
/*
* USB device definitions
*/
#define STRING_PRODUCT "Arduino MKRZero"
#define USB_VID_HIGH 0x23
#define USB_VID_LOW 0x41
#define USB_PID_HIGH 0x00
#define USB_PID_LOW 0x4F
/*
* If BOOT_DOUBLE_TAP_ADDRESS is defined the bootloader is started by
* quickly tapping two times on the reset button.
* BOOT_DOUBLE_TAP_ADDRESS must point to a free SRAM cell that must not
* be touched from the loaded application.
*/
#define BOOT_DOUBLE_TAP_ADDRESS (0x20007FFCul)
#define BOOT_DOUBLE_TAP_DATA (*((volatile uint32_t *) BOOT_DOUBLE_TAP_ADDRESS))
/*
* If BOOT_LOAD_PIN is defined the bootloader is started if the selected
* pin is tied LOW.
*/
//#define BOOT_LOAD_PIN PIN_PA21
//#define BOOT_LOAD_PIN PIN_PA15
#define BOOT_USART_MODULE SERCOM5
#define BOOT_USART_BUS_CLOCK_INDEX PM_APBCMASK_SERCOM5
#define BOOT_USART_PER_CLOCK_INDEX GCLK_CLKCTRL_ID_SERCOM5_CORE_Val
#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2
#define BOOT_USART_PAD3 PINMUX_PB23D_SERCOM5_PAD3
#define BOOT_USART_PAD2 PINMUX_PB22D_SERCOM5_PAD2
#define BOOT_USART_PAD1 PINMUX_UNUSED
#define BOOT_USART_PAD0 PINMUX_UNUSED
/* Master clock frequency */
#define CPU_FREQUENCY (48000000ul)
#define VARIANT_MCK CPU_FREQUENCY
/* Frequency of the board main oscillator */
#define VARIANT_MAINOSC (32768ul)
/* Calibration values for DFLL48 pll */
#define NVM_SW_CALIB_DFLL48M_COARSE_VAL (58)
#define NVM_SW_CALIB_DFLL48M_FINE_VAL (64)
/*
* LEDs definitions
*/
// PB08 (digital pin 32)
#define BOARD_LED_PORT (1)
#define BOARD_LED_PIN (8)
// No RX/TX led
//#define BOARD_LEDRX_PORT
//#define BOARD_LEDRX_PIN
//#define BOARD_LEDTX_PORT
//#define BOARD_LEDTX_PIN
#endif // _BOARD_DEFINITIONS_H_
......@@ -10,5 +10,8 @@ mv -v samd21_sam_ba_arduino_mkr1000.* ../mkr1000/
BOARD_ID=genuino_mkr1000 NAME=samd21_sam_ba_genuino_mkr1000 make clean all
mv -v samd21_sam_ba_genuino_mkr1000.* ../mkr1000/
BOARD_ID=arduino_mkrzero NAME=samd21_sam_ba_arduino_mkrzero make clean all
mv -v samd21_sam_ba_arduino_mkrzero.* ../mkrzero/
echo Done building bootloaders!
#
# Arduino Zero OpenOCD script.
#
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Define 'reset' command
define reset
info reg
break main
# End of 'reset' command
end
target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log"
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* Linker script to configure memory regions.
* Need modifying for a specific board.
* FLASH.ORIGIN: starting address of flash
* FLASH.LENGTH: length of flash
* RAM.ORIGIN: starting address of RAM bank 0
* RAM.LENGTH: length of RAM bank 0
*/
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
}
/* Linker script to place sections and symbol values. Should be used together
* with other linker script that defines memory regions FLASH and RAM.
* It references following symbols, which must be defined in code:
* Reset_Handler : Entry of reset handler
*
* It defines following symbols, which code can use without definition:
* __exidx_start
* __exidx_end
* __copy_table_start__
* __copy_table_end__
* __zero_table_start__
* __zero_table_end__
* __etext
* __data_start__
* __preinit_array_start
* __preinit_array_end
* __init_array_start
* __init_array_end
* __fini_array_start
* __fini_array_end
* __data_end__
* __bss_start__
* __bss_end__
* __end__
* end
* __HeapLimit
* __StackLimit
* __StackTop
* __stack
*/
ENTRY(Reset_Handler)
SECTIONS
{
.text :
{
KEEP(*(.isr_vector))
*(.text*)
KEEP(*(.init))
KEEP(*(.fini))
/* .ctors */
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
*(SORT(.ctors.*))
*(.ctors)
/* .dtors */
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
*(.rodata*)
KEEP(*(.eh_frame*))
} > FLASH
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > FLASH
__exidx_end = .;
/* To copy multiple ROM to RAM sections,
* uncomment .copy.table section and,
* define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */
/*
.copy.table :
{
. = ALIGN(4);
__copy_table_start__ = .;
LONG (__etext)
LONG (__data_start__)
LONG (__data_end__ - __data_start__)
LONG (__etext2)
LONG (__data2_start__)
LONG (__data2_end__ - __data2_start__)
__copy_table_end__ = .;
} > FLASH
*/
/* To clear multiple BSS sections,
* uncomment .zero.table section and,
* define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */
/*
.zero.table :
{
. = ALIGN(4);
__zero_table_start__ = .;
LONG (__bss_start__)
LONG (__bss_end__ - __bss_start__)
LONG (__bss2_start__)
LONG (__bss2_end__ - __bss2_start__)
__zero_table_end__ = .;
} > FLASH
*/
__etext = .;
.data : AT (__etext)
{
__data_start__ = .;
*(vtable)
*(.data*)
. = ALIGN(4);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
KEEP(*(.jcr*))
. = ALIGN(4);
/* All data end */
__data_end__ = .;
} > RAM
.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end__ = .;
} > RAM
.heap (COPY):
{
__end__ = .;
PROVIDE(end = .);
*(.heap*)
__HeapLimit = .;
} > RAM
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy (COPY):
{
*(.stack*)
} > RAM
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop);
__ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ;
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
}
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* Linker script to configure memory regions.
* Need modifying for a specific board.
* FLASH.ORIGIN: starting address of flash
* FLASH.LENGTH: length of flash
* RAM.ORIGIN: starting address of RAM bank 0
* RAM.LENGTH: length of RAM bank 0
*/
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
}
/* Linker script to place sections and symbol values. Should be used together
* with other linker script that defines memory regions FLASH and RAM.
* It references following symbols, which must be defined in code:
* Reset_Handler : Entry of reset handler
*
* It defines following symbols, which code can use without definition:
* __exidx_start
* __exidx_end
* __copy_table_start__
* __copy_table_end__
* __zero_table_start__
* __zero_table_end__
* __etext
* __data_start__
* __preinit_array_start
* __preinit_array_end
* __init_array_start
* __init_array_end
* __fini_array_start
* __fini_array_end
* __data_end__
* __bss_start__
* __bss_end__
* __end__
* end
* __HeapLimit
* __StackLimit
* __StackTop
* __stack
* __ram_end__
*/
ENTRY(Reset_Handler)
SECTIONS
{
.text :
{
KEEP(*(.isr_vector))
*(.text*)
KEEP(*(.init))
KEEP(*(.fini))
/* .ctors */
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
*(SORT(.ctors.*))
*(.ctors)
/* .dtors */
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
*(.rodata*)
KEEP(*(.eh_frame*))
} > FLASH
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > FLASH
__exidx_end = .;
/* To copy multiple ROM to RAM sections,
* uncomment .copy.table section and,
* define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */
/*
.copy.table :
{
. = ALIGN(4);
__copy_table_start__ = .;
LONG (__etext)
LONG (__data_start__)
LONG (__data_end__ - __data_start__)
LONG (__etext2)
LONG (__data2_start__)
LONG (__data2_end__ - __data2_start__)
__copy_table_end__ = .;
} > FLASH
*/
/* To clear multiple BSS sections,
* uncomment .zero.table section and,
* define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */
/*
.zero.table :
{
. = ALIGN(4);
__zero_table_start__ = .;
LONG (__bss_start__)
LONG (__bss_end__ - __bss_start__)
LONG (__bss2_start__)
LONG (__bss2_end__ - __bss2_start__)
__zero_table_end__ = .;
} > FLASH
*/
__etext = .;
.data : AT (__etext)
{
__data_start__ = .;
*(vtable)
*(.data*)
. = ALIGN(4);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
KEEP(*(.jcr*))
. = ALIGN(4);
/* All data end */
__data_end__ = .;
} > RAM
.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end__ = .;
} > RAM
.heap (COPY):
{
__end__ = .;
PROVIDE(end = .);
*(.heap*)
__HeapLimit = .;
} > RAM
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy (COPY):
{
*(.stack*)
} > RAM
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(RAM) + LENGTH(RAM) ;
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop);
__ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ;
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
}
#
# Arduino Zero OpenOCD script.
#
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
source [find interface/cmsis-dap.cfg]
# chip name
set CHIPNAME at91samd21g18
set ENDIAN little
# choose a port here
set telnet_port 0
source [find target/at91samdXX.cfg]
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// API compatibility
#include "variant.h"
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "variant.h"
const PinDescription g_APinDescription[] = {
/*
+------------+------------------+--------+-----------------+--------+-----------------------+---------+---------+--------+--------+----------+----------+
| Pin number | MKR Board pin | PIN | Notes | Peri.A | Peripheral B | Perip.C | Perip.D | Peri.E | Peri.F | Periph.G | Periph.H |
| | | | | EIC | ADC | AC | PTC | DAC | SERCOMx | SERCOMx | TCCx | TCCx | COM | AC/GLCK |
| | | | |(EXTINT)|(AIN)|(AIN)| | | (x/PAD) | (x/PAD) | (x/WO) | (x/WO) | | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
| 00 | D0 | PA22 | | *06 | | | X10 | | 3/00 | 5/00 |* TC4/0 | TCC0/4 | | GCLK_IO6 |
| 01 | D1 | PA23 | | *07 | | | X11 | | 3/01 | 5/01 |* TC4/1 | TCC0/5 | USB/SOF | GCLK_IO7 |
| 02 | D2 | PA10 | | 10 | *18 | | X02 | | 0/02 | 2/02 |*TCC1/0 | TCC0/2 | I2S/SCK0 | GCLK_IO4 |
| 03 | D3 | PA11 | | 11 | *19 | | X03 | | 0/03 | 2/03 |*TCC1/1 | TCC0/3 | I2S/FS0 | GCLK_IO5 |
| 04 | D4 | PB10 | | *10 | | | | | | 4/02 |* TC5/0 | TCC0/4 | I2S/MCK1 | GCLK_IO4 |
| 05 | D5 | PB11 | | *11 | | | | | | 4/03 |* TC5/1 | TCC0/5 | I2S/SCK1 | GCLK_IO5 |
| 06 | D6 | PA20 | | *04 | | | X08 | | 5/02 | 3/02 | |*TCC0/6 | I2S/SCK0 | GCLK_IO4 |
| 07 | D7 | PA21 | | *05 | | | X09 | | 5/03 | 3/03 | |*TCC0/7 | I2S/FS0 | GCLK_IO5 |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
*/
{ PORTA, 22, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), No_ADC_Channel, PWM4_CH0, TC4_CH0, EXTERNAL_INT_6 },
{ PORTA, 23, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), No_ADC_Channel, PWM4_CH1, TC4_CH1, EXTERNAL_INT_7 },
{ PORTA, 10, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), ADC_Channel18, PWM1_CH0, TCC1_CH0, EXTERNAL_INT_NONE },
{ PORTA, 11, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), ADC_Channel19, PWM1_CH1, TCC1_CH1, EXTERNAL_INT_NONE },
{ PORTB, 10, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), No_ADC_Channel, PWM5_CH0, TC5_CH0, EXTERNAL_INT_10 },
{ PORTB, 11, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), No_ADC_Channel, PWM5_CH1, TC5_CH1, EXTERNAL_INT_11 },
{ PORTA, 20, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER_ALT), No_ADC_Channel, PWM0_CH6, TCC0_CH6, EXTERNAL_INT_4 },
{ PORTA, 21, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER_ALT), No_ADC_Channel, PWM0_CH7, TCC0_CH7, EXTERNAL_INT_5 },
/*
+------------+------------------+--------+-----------------+--------+-----------------------+---------+---------+--------+--------+----------+----------+
| Pin number | MKR Board pin | PIN | Notes | Peri.A | Peripheral B | Perip.C | Perip.D | Peri.E | Peri.F | Periph.G | Periph.H |
| | | | | EIC | ADC | AC | PTC | DAC | SERCOMx | SERCOMx | TCCx | TCCx | COM | AC/GLCK |
| | | | |(EXTINT)|(AIN)|(AIN)| | | (x/PAD) | (x/PAD) | (x/WO) | (x/WO) | | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
| | SPI | | | | | | | | | | | | | |
| 08 | MOSI | PA16 | | *00 | | | X04 | | *1/00 | 3/00 |*TCC2/0 | TCC0/6 | | GCLK_IO2 |
| 09 | SCK | PA17 | | *01 | | | X05 | | *1/01 | 3/01 | TCC2/1 | TCC0/7 | | GCLK_IO3 |
| 10 | MISO | PA19 | | 03 | | | X07 | | *1/03 | 3/03 |* TC3/1 | TCC0/3 | I2S/SD0 | AC/CMP1 |
+------------+------------------+--------+-----------------+--------------------+-----+-----+---------+---------+--------+--------+----------+----------+
| | Wire | | | | | | | | | | | | | |
| 11 | SDA | PA08 | | NMI | *16 | | X00 | | *0/00 | 2/00 | TCC0/0 | TCC1/2 | I2S/SD1 | |
| 12 | SCL | PA09 | | 09 | *17 | | X01 | | *0/01 | 2/01 | TCC0/1 | TCC1/3 | I2S/MCK0 | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
| | Serial1 | | | | | | | | | | | | | |
| 13 | RX | PB23 | | 07 | | | | | | *5/03 | | | | GCLK_IO1 |
| 14 | TX | PB22 | | 06 | | | | | | *5/02 | | | | GCLK_IO0 |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
*/
// DIPO=3 DOPO=0
{ PORTA, 16, PIO_SERCOM, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), No_ADC_Channel, PWM2_CH0, TCC2_CH0, EXTERNAL_INT_0 }, // MOSI: SERCOM1/PAD[0]
{ PORTA, 17, PIO_SERCOM, (PIN_ATTR_DIGITAL ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_1 }, // SCK: SERCOM1/PAD[1]
{ PORTA, 19, PIO_SERCOM, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), No_ADC_Channel, PWM3_CH1, TC3_CH1, EXTERNAL_INT_NONE }, // MISO: SERCOM1/PAD[3]
// PINOUT=0
{ PORTA, 8, PIO_SERCOM, (PIN_ATTR_DIGITAL ), ADC_Channel16, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NMI }, // SDA: SERCOM0/PAD[0]
{ PORTA, 9, PIO_SERCOM, (PIN_ATTR_DIGITAL ), ADC_Channel17, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // SCL: SERCOM0/PAD[1]
// RXPO=3 TXPO=1
{ PORTB, 23, PIO_SERCOM_ALT, (PIN_ATTR_DIGITAL ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // RX: SERCOM5/PAD[3]
{ PORTB, 22, PIO_SERCOM_ALT, (PIN_ATTR_DIGITAL ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // TX: SERCOM5/PAD[2]
/*
+------------+------------------+--------+-----------------+--------+-----------------------+---------+---------+--------+--------+----------+----------+
| Pin number | MKR Board pin | PIN | Notes | Peri.A | Peripheral B | Perip.C | Perip.D | Peri.E | Peri.F | Periph.G | Periph.H |
| | | | | EIC | ADC | AC | PTC | DAC | SERCOMx | SERCOMx | TCCx | TCCx | COM | AC/GLCK |
| | | | |(EXTINT)|(AIN)|(AIN)| | | (x/PAD) | (x/PAD) | (x/WO) | (x/WO) | | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
| 15 | A0 / DAC0 | PA02 | | 02 | *00 | | Y00 | OUT | | | | | | |
| 16 | A1 | PB02 | | *02 | *10 | | Y08 | | | 5/00 | | | | |
| 17 | A2 | PB03 | | *03 | *11 | | Y09 | | | 5/01 | | | | |
| 18 | A3 | PA04 | | 04 | *04 | 00 | Y02 | | | 0/00 |*TCC0/0 | | | |
| 19 | A4 | PA05 | | 05 | *05 | 01 | Y03 | | | 0/01 |*TCC0/1 | | | |
| 20 | A5 | PA06 | | 06 | *06 | 02 | Y04 | | | 0/02 | TCC1/0 | | | |
| 21 | A6 | PA07 | | 07 | *07 | 03 | Y05 | | | 0/03 | TCC1/1 | | I2S/SD0 | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
*/
{ PORTA, 2, PIO_ANALOG, (PIN_ATTR_DIGITAL|PIN_ATTR_ANALOG /*DAC*/ ), ADC_Channel0, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
{ PORTB, 2, PIO_ANALOG, (PIN_ATTR_DIGITAL ), ADC_Channel10, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_2 },
{ PORTB, 3, PIO_ANALOG, (PIN_ATTR_DIGITAL ), ADC_Channel11, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_3 },
{ PORTA, 4, PIO_ANALOG, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), ADC_Channel4, PWM0_CH0, TCC0_CH0, EXTERNAL_INT_NONE },
{ PORTA, 5, PIO_ANALOG, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER ), ADC_Channel5, PWM0_CH1, TCC0_CH1, EXTERNAL_INT_NONE },
{ PORTA, 6, PIO_ANALOG, (PIN_ATTR_DIGITAL ), ADC_Channel6, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
{ PORTA, 7, PIO_ANALOG, (PIN_ATTR_DIGITAL ), ADC_Channel7, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
/*
+------------+------------------+--------+-----------------+--------+-----------------------+---------+---------+--------+--------+----------+----------+
| Pin number | MKR Board pin | PIN | Notes | Peri.A | Peripheral B | Perip.C | Perip.D | Peri.E | Peri.F | Periph.G | Periph.H |
| | | | | EIC | ADC | AC | PTC | DAC | SERCOMx | SERCOMx | TCCx | TCCx | COM | AC/GLCK |
| | | | |(EXTINT)|(AIN)|(AIN)| | | (x/PAD) | (x/PAD) | (x/WO) | (x/WO) | | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
| | USB | | | | | | | | | | | | | |
| 22 | | PA24 | USB N | 12 | | | | | 3/02 | 5/02 | TC5/0 | TCC1/2 | USB/DM | |
| 23 | | PA25 | USB P | 13 | | | | | 3/03 | 5/03 | TC5/1 | TCC1/3 | USB/DP | |
| 24 | | PA18 | USB ID | 02 | | | X06 | | 1/02 | 3/02 | TC3/0 | TCC0/2 | | AC/CMP0 |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
| 25 | AREF | PA03 | | 03 | 01 | | Y01 | | | | | | | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
*/
{ PORTA, 24, PIO_COM, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DM
{ PORTA, 25, PIO_COM, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DP
{ PORTA, 18, PIO_DIGITAL, (PIN_ATTR_DIGITAL ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
{ PORTA, 3, PIO_DIGITAL, (PIN_ATTR_DIGITAL ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // DAC/VREFP
/*
+------------+------------------+--------+-----------------+--------+-----------------------+---------+---------+--------+--------+----------+----------+
| Pin number | MKR Board pin | PIN | Notes | Peri.A | Peripheral B | Perip.C | Perip.D | Peri.E | Peri.F | Periph.G | Periph.H |
| | | | | EIC | ADC | AC | PTC | DAC | SERCOMx | SERCOMx | TCCx | TCCx | COM | AC/GLCK |
| | | | |(EXTINT)|(AIN)|(AIN)| | | (x/PAD) | (x/PAD) | (x/WO) | (x/WO) | | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
| | SD SPI | | | | | | | | | | | | | |
| 26 | | PA12 | SD SCK | 12 | | | | | *2/00 | 4/00 | TCC2/0 | TCC0/6 | | AC/CMP0 |
| 27 | | PA13 | SD MOSI | 13 | | | | | *2/01 | 4/01 | TCC2/1 | TCC0/7 | | AC/CMP1 |
| 28 | | PA14 | SD SS | 14 | | | | | 2/02 | 4/02 | TC3/0 | TCC0/4 | | GCLK_IO0 |
| 29 | | PA15 | SD MISO | 15 | | | | | *2/03 | 4/03 | TC3/1 | TCC0/5 | | GCLK_IO1 |
| 30 | | PA27 | SD CD | 15 | | | | | | | | | | GCLK_IO0 |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
| 31 | | PA28 | BOTTOM PAD | 08 | | | | | | | | | | GCLK_IO0 |
| 32 | | PB08 | LED_BUILTIN | 08 | 02 | | Y14 | | | 4/00 | TC4/0 | | | |
| 33 | | PB09 | ADC_BATTERY | *09 | 03 | | Y15 | | | 4/01 | TC4/1 | | | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
| | 32768Hz Crystal | | | | | | | | | | | | | |
| 34 | | PA00 | XIN32 | 00 | | | | | | 1/00 | TCC2/0 | | | |
| 35 | | PA01 | XOUT32 | 01 | | | | | | 1/01 | TCC2/1 | | | |
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
*/
// DIPO=3 DOPO=0
{ PORTA, 12, PIO_SERCOM, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // MOSI: SERCOM2/PAD[0]
{ PORTA, 13, PIO_SERCOM, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // SCK: SERCOM2/PAD[1]
{ PORTA, 14, PIO_DIGITAL, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // SS: as GPIO
{ PORTA, 15, PIO_SERCOM, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // MISO: SERCOM2/PAD[3]
{ PORTA, 27, PIO_DIGITAL, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
{ PORTA, 28, PIO_DIGITAL, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
{ PORTB, 8, PIO_DIGITAL, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
{ PORTB, 9, PIO_ANALOG, (PIN_ATTR_PWM|PIN_ATTR_TIMER), ADC_Channel3, PWM4_CH1, TC4_CH1, EXTERNAL_INT_9 },
{ PORTA, 0, PIO_DIGITAL, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
{ PORTA, 1, PIO_DIGITAL, (PIN_ATTR_NONE ), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
};
const void* g_apTCInstances[TCC_INST_NUM + TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 };
// Multi-serial objects instantiation
SERCOM sercom0(SERCOM0);
SERCOM sercom1(SERCOM1);
SERCOM sercom2(SERCOM2);
SERCOM sercom3(SERCOM3);
SERCOM sercom4(SERCOM4);
SERCOM sercom5(SERCOM5);
// Serial1
Uart Serial1(&sercom5, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX);
void SERCOM5_Handler()
{
Serial1.IrqHandler();
}
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#pragma once
// The definitions here needs a SAMD core >=1.6.3
#define ARDUINO_SAMD_VARIANT_COMPLIANCE 10603
#include <WVariant.h>
// General definitions
// -------------------
// Frequency of the board main oscillator
#define VARIANT_MAINOSC (32768ul)
// Master clock frequency
#define VARIANT_MCK (48000000ul)
// Pins
// ----
// Number of pins defined in PinDescription array
#define PINS_COUNT (26u)
#define NUM_DIGITAL_PINS (15u)
#define NUM_ANALOG_INPUTS (7u)
#define NUM_ANALOG_OUTPUTS (1u)
// Low-level pin register query macros
// -----------------------------------
#define digitalPinToPort(P) (&(PORT->Group[g_APinDescription[P].ulPort]))
#define digitalPinToBitMask(P) (1 << g_APinDescription[P].ulPin)
//#define analogInPinToBit(P) ()
#define portOutputRegister(port) (&(port->OUT.reg))
#define portInputRegister(port) (&(port->IN.reg))
#define portModeRegister(port) (&(port->DIR.reg))
#define digitalPinHasPWM(P) (g_APinDescription[P].ulPWMChannel != NOT_ON_PWM || g_APinDescription[P].ulTCChannel != NOT_ON_TIMER)
#define digitalPinToInterrupt(P) (g_APinDescription[P].ulExtInt)
/*
* digitalPinToTimer(..) is AVR-specific and is not defined for SAMD
* architecture. If you need to check if a pin supports PWM you must
* use digitalPinHasPWM(..).
*
* https://github.com/arduino/Arduino/issues/1833
*/
// #define digitalPinToTimer(P)
//Battery
#define ADC_BATTERY (33u)
// LEDs
// ----
#define PIN_LED (32u)
#define LED_BUILTIN PIN_LED
// Analog pins
// -----------
#define PIN_A0 (15u)
#define PIN_A1 (16u)
#define PIN_A2 (17u)
#define PIN_A3 (18u)
#define PIN_A4 (19u)
#define PIN_A5 (20u)
#define PIN_A6 (21u)
static const uint8_t A0 = PIN_A0;
static const uint8_t A1 = PIN_A1;
static const uint8_t A2 = PIN_A2;
static const uint8_t A3 = PIN_A3;
static const uint8_t A4 = PIN_A4;
static const uint8_t A5 = PIN_A5;
static const uint8_t A6 = PIN_A6;
#define ADC_RESOLUTION 12
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 2
// SPI
#define PIN_SPI_MISO (10u)
#define PIN_SPI_MOSI (8u)
#define PIN_SPI_SCK (9u)
#define PIN_SPI_SS (4u)
#define PERIPH_SPI sercom1
#define PAD_SPI_TX SPI_PAD_0_SCK_1
#define PAD_SPI_RX SERCOM_RX_PAD_3
static const uint8_t SS = PIN_SPI_SS; // SPI Slave SS not used. Set here only for reference.
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK = PIN_SPI_SCK;
// SPI1: Connected to SD
#define USE_SPI1
#define PIN_SPI1_MISO (29u)
#define PIN_SPI1_MOSI (26u)
#define PIN_SPI1_SCK (27u)
#define PIN_SPI1_SS (28u)
#define PERIPH_SPI1 sercom2
#define PAD_SPI1_TX SPI_PAD_0_SCK_1
#define PAD_SPI1_RX SERCOM_RX_PAD_3
static const uint8_t SS1 = PIN_SPI1_SS;
static const uint8_t MOSI1 = PIN_SPI1_MOSI;
static const uint8_t MISO1 = PIN_SPI1_MISO;
static const uint8_t SCK1 = PIN_SPI1_SCK;
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 1
// Wire
#define PIN_WIRE_SDA (11u)
#define PIN_WIRE_SCL (12u)
#define PERIPH_WIRE sercom0
#define WIRE_IT_HANDLER SERCOM0_Handler
// USB
// ---
#define PIN_USB_DM (22ul)
#define PIN_USB_DP (23ul)
#define PIN_USB_HOST_ENABLE (24ul)
// Serial ports
// ------------
#ifdef __cplusplus
#include "SERCOM.h"
#include "Uart.h"
// Instances of SERCOM
extern SERCOM sercom0;
extern SERCOM sercom1;
extern SERCOM sercom2;
extern SERCOM sercom3;
extern SERCOM sercom4;
extern SERCOM sercom5;
// Serial1
extern Uart Serial1;
#define PIN_SERIAL1_RX (13ul)
#define PIN_SERIAL1_TX (14ul)
#define PAD_SERIAL1_TX (UART_TX_PAD_2)
#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3)
#endif // __cplusplus
// These serial port names are intended to allow libraries and architecture-neutral
// sketches to automatically default to the correct port name for a particular type
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
//
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
//
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
//
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
//
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
//
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
// pins are NOT connected to anything by default.
#define SERIAL_PORT_USBVIRTUAL SerialUSB
#define SERIAL_PORT_MONITOR SerialUSB
#define SERIAL_PORT_HARDWARE Serial1
#define SERIAL_PORT_HARDWARE_OPEN Serial1
// Alias Serial to SerialUSB
#define Serial SerialUSB
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment