├── .gitignore ├── .gitmodules ├── README.md ├── hardware └── ariadne │ ├── avr │ ├── boards.txt │ ├── bootloaders │ │ └── ariadne │ │ │ ├── ariadne_atmega1284_w5100.hex │ │ │ ├── ariadne_atmega1284_w5200.hex │ │ │ ├── ariadne_atmega1284_w5500.hex │ │ │ ├── ariadne_atmega2560_w5100.hex │ │ │ ├── ariadne_atmega2560_w5200.hex │ │ │ ├── ariadne_atmega2560_w5500.hex │ │ │ ├── ariadne_atmega328_ethernet.hex │ │ │ ├── ariadne_atmega328_w5100.hex │ │ │ ├── ariadne_atmega328_w5200.hex │ │ │ ├── ariadne_atmega328_w5500.hex │ │ │ ├── ariadne_debug1284_w5100.hex │ │ │ ├── ariadne_debug1284_w5200.hex │ │ │ ├── ariadne_debug1284_w5500.hex │ │ │ ├── ariadne_debug2560_w5100.hex │ │ │ ├── ariadne_debug2560_w5200.hex │ │ │ ├── ariadne_debug2560_w5500.hex │ │ │ ├── ariadne_debug328_w5100.hex │ │ │ ├── ariadne_debug328_w5200.hex │ │ │ └── ariadne_debug328_w5500.hex │ ├── platform.txt │ └── variants │ │ └── bobuino │ │ └── pins_arduino.h │ ├── boards.txt │ ├── bootloaders │ └── ariadne │ │ ├── Makefile │ │ ├── NOTES │ │ ├── README.md │ │ ├── announce.c │ │ ├── announce.h │ │ ├── ariadne_atmega1284_w5100.hex │ │ ├── ariadne_atmega1284_w5200.hex │ │ ├── ariadne_atmega1284_w5500.hex │ │ ├── ariadne_atmega2560_w5100.hex │ │ ├── ariadne_atmega2560_w5200.hex │ │ ├── ariadne_atmega2560_w5500.hex │ │ ├── ariadne_atmega328_ethernet.hex │ │ ├── ariadne_atmega328_w5100.hex │ │ ├── ariadne_atmega328_w5200.hex │ │ ├── ariadne_atmega328_w5500.hex │ │ ├── ariadne_debug1284_w5100.hex │ │ ├── ariadne_debug1284_w5200.hex │ │ ├── ariadne_debug1284_w5500.hex │ │ ├── ariadne_debug2560_w5100.hex │ │ ├── ariadne_debug2560_w5200.hex │ │ ├── ariadne_debug2560_w5500.hex │ │ ├── ariadne_debug328_w5100.hex │ │ ├── ariadne_debug328_w5200.hex │ │ ├── ariadne_debug328_w5500.hex │ │ ├── debug.c │ │ ├── debug.h │ │ ├── debug_ann.h │ │ ├── debug_main.h │ │ ├── debug_net.h │ │ ├── debug_spi.h │ │ ├── debug_tftp.h │ │ ├── debug_util.h │ │ ├── debug_vald.h │ │ ├── main.c │ │ ├── makerelease │ │ ├── net.c │ │ ├── net.h │ │ ├── neteeprom.h │ │ ├── omake │ │ ├── omake.bat │ │ ├── optiboot.c │ │ ├── optiboot.h │ │ ├── optiboot_stk500.h │ │ ├── serial.c │ │ ├── serial.h │ │ ├── spi.c │ │ ├── spi.h │ │ ├── stk500boot.c │ │ ├── stk500boot.h │ │ ├── stk500boot_command.h │ │ ├── tftp.c │ │ ├── tftp.h │ │ ├── util.c │ │ ├── util.h │ │ ├── validate.c │ │ ├── validate.h │ │ ├── w5100.h │ │ ├── w5200.h │ │ ├── w5500.h │ │ ├── watchdog.c │ │ └── watchdog.h │ ├── programmers.txt │ └── variants │ └── bobuino │ └── pins_arduino.h ├── java-client ├── Recv.java └── Send.java ├── libraries ├── EthernetReset │ ├── EthernetReset.cpp │ ├── EthernetReset.h │ ├── examples │ │ └── ResetServer │ │ │ └── ResetServer.ino │ └── keywords.txt ├── NetEEPROM │ ├── NetEEPROM.cpp │ ├── NetEEPROM.h │ ├── NetEEPROM_defs.h │ ├── examples │ │ ├── ReadNetworkSettings │ │ │ └── ReadNetworkSettings.ino │ │ └── WriteNetworkSettings │ │ │ └── WriteNetworkSettings.ino │ ├── keywords.txt │ └── library.properties └── NewEEPROM │ ├── NewEEPROM.cpp │ ├── NewEEPROM.h │ ├── examples │ ├── eeprom_clear │ │ └── eeprom_clear.ino │ ├── eeprom_read │ │ └── eeprom_read.ino │ └── eeprom_write │ │ └── eeprom_write.ino │ └── keywords.txt └── utilities ├── net-setup.sh └── tests ├── bigprogram └── bigprogram.ino ├── blink ├── atmega2560_blink13.bin ├── atmega328_blink13.bin └── atmega328_blink9.bin ├── fade └── bigapp.bin └── led_display ├── led_display.bin └── led_display.hex /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.o 3 | *.lst 4 | *.class 5 | *.elf 6 | *.kdev* 7 | *.geany 8 | *.pdf 9 | Doxyfile 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "utilities/arscons"] 2 | path = utilities/arscons 3 | url = https://github.com/suapapa/arscons.git 4 | -------------------------------------------------------------------------------- /hardware/ariadne/avr/bootloaders/ariadne/ariadne_atmega1284_w5100.hex: -------------------------------------------------------------------------------- 1 | :020000021000EC 2 | :10E0000055C0000004C3000002C3000000C30000AC 3 | :10E01000FEC20000FCC20000FAC20000F8C200000C 4 | :10E02000F6C20000F4C20000F2C20000F0C200001C 5 | :10E03000EEC20000ECC20000EAC20000E8C200002C 6 | :10E04000E6C20000E4C20000E2C20000E0C200003C 7 | :10E05000DEC20000DCC20000DAC20000D8C200004C 8 | :10E06000D6C20000D4C20000D2C20000D0C200005C 9 | :10E07000CEC20000CCC20000CAC20000C8C200006C 10 | :10E08000C6C20000C4C20000C2C2000000050003F6 11 | :10E0900046756C6C00000500044F70636F64653F4B 12 | :10E0A00000000500004572726F72000011241FBE4F 13 | :10E0B000CFEFD0E4DEBFCDBF11E0A0E0B1E0E2EFF2 14 | :10E0C000FAEE01E00BBF02C007900D92AC31B10730 15 | :10E0D000D9F721E0ACE1B1E001C01D92AB32B2074B 16 | :10E0E000E1F701D004C5CDB7DEB7C750D140DEBFE0 17 | :10E0F000CDBF14BE0FB6F894A895809160008861DA 18 | :10E1000080936000109260000FBE99E288E10FB624 19 | :10E11000F894A895809360000FBE909360002FEF55 20 | :10E1200033EC49E0215030404040E1F700C00000AE 21 | :10E13000112484E08093810080E090E0C2D48823A1 22 | :10E1400021F060E080E090E0C4D481E090E0B9D4B8 23 | :10E15000843021F064E081E090E0BBD482E08093E1 24 | :10E16000C00088E18093C10086E08093C20080E116 25 | :10E170008093C40080EF85B980EB84B9479A3F9AB9 26 | :10E1800081E08DBD83E090E09CD4853539F050E08E 27 | :10E19000E52E51E0F52E00E010E016C084E090E09E 28 | :10E1A00090D48A3AA1F741E0E42E41E0F42E05E054 29 | :10E1B00010E0C80186D4F70181937F010F5F1F4FE4 30 | :10E1C00007311105B1F7E3CFF70141917F0160E01D 31 | :10E1D000C80180D20F5F1F4F0C311105A9F7E2D2A1 32 | :10E1E000109222011092210181EA90EE4C01A12CA3 33 | :10E1F000B12CFFEFAF1ABF0A8CE890EE2C01612C16 34 | :10E20000712C2FEF621A720A85E990EEA0E0B0E05F 35 | :10E210009C01AD014F5F5F4FCD5FDE4F2883398397 36 | :10E220004A835B83C350D140AE014F5F5E4FCF5FE7 37 | :10E23000DE4F59834883C150D14080912201811122 38 | :10E240009BC068E686E297E02DD2892B09F494C042 39 | :10E2500081E08093210168E682E097E009D282FFA5 40 | :10E260000FC044E06CE682E097E034D25FEF87E8CD 41 | :10E2700093E1515080409040E1F700C00000EBCFA7 42 | :10E28000B4D2182F60E084E297E00CD2985A7C0157 43 | :10E29000123061F118F4113089F004C01330E9F044 44 | :10E2A000143099F12AE030E0B501A401CE010196C5 45 | :10E2B000FED30AE0FE0131961F0144C02CE030E09D 46 | :10E2C000CD5FDE4F488159816A817B81C350D14047 47 | :10E2D000CE010196ECD30CE0EDCF29E030E0B301A4 48 | :10E2E000A201CE010196E3D309E0E4CF809123019E 49 | :10E2F000909124012091250130912601281739079A 50 | :10E3000020F49093260180932501198284E08A836A 51 | :10E3100080912301909124019B838C8304E0CACFD8 52 | :10E32000F10141911F016701FFEFCF1ADF0A64E796 53 | :10E33000C701D0D1C11420E6D20619F4C12C38E5AA 54 | :10E34000D32E7601015060F7B701785584E297E04B 55 | :10E35000DAD140E26CE681E097E0BCD168E681E08A 56 | :10E3600097E086D18111FACF143031F440E16CE6A8 57 | :10E3700081E097E0AFD136C1809121018111EAC0DF 58 | :10E380008091C00087FFE6C043D181E080932201E5 59 | :10E3900049D18134B9F446D1C95FDE4F8883C75073 60 | :10E3A000D14053D1C95FDE4F8881C750D1408238F8 61 | :10E3B00011F484E003C0813819F480E03FD1C8C073 62 | :10E3C00083E0FCCF823411F484E103C0853419F476 63 | :10E3D00084E047D1BDC08535A1F424D1182F22D1C6 64 | :10E3E000212F30E0A901582BCA01292F221F2227F3 65 | :10E3F000221F2BBF880F991F90931E0180931D0130 66 | :10E40000A6C0863519F484E02CD1D7CF843609F024 67 | :10E410006EC008D107D180931C0104D1E0901D018A 68 | :10E42000F0901E01E11450EEF50650F4C701A0E093 69 | :10E43000B0E023E0FC01A0935B0020935700E89537 70 | :10E440008E010F5F1F4FEED0F80181938F018091F5 71 | :10E450001C01815080931C018111F5CFE114F0EE75 72 | :10E46000FF0650F0C701A0E0B0E023E0FC01A0935C 73 | :10E470005B0020935700E895E8D007B600FCFDCF7D 74 | :10E480008981DE01119697012A1B3B0B11E0AD013A 75 | :10E49000420F531F129660E070E0FD013197E0815A 76 | :10E4A00090E09E2B0C01FA0160935B0010935700E3 77 | :10E4B000E8951124CF5FDE4F48815981C150D1408A 78 | :10E4C000A417B50711F08C91E2CFC701A0E0B0E02E 79 | :10E4D00025E0FC01A0935B0020935700E89507B668 80 | :10E4E00000FCFDCF81E180935700E89531C084376F 81 | :10E4F000D9F498D097D080931C0194D0A6D00091E5 82 | :10E500001D0110911E01F801869198D00F5F1F4FD9 83 | :10E5100010931E0100931D0180911C018150809376 84 | :10E520001C018111ECCF14C0853739F48ED08EE1F7 85 | :10E5300085D087E983D085E041CF813541F485D00E 86 | :10E540006EEE82E090E0C5D280E178D04BC07DD005 87 | :10E5500080E174D080E090E0DC01ABBFFC018791EA 88 | :10E5600096910196E9F08091290190912A010A97EC 89 | :10E57000B8F082E090E0A5D28E3EA1F18091210119 90 | :10E58000813071F440E050E0BA0183E0FA01609319 91 | :10E590005B0080935700E89505D13AD01092210195 92 | :10E5A000A895809184009091850094FF04C02BB1C0 93 | :10E5B00020582BB901C05F9820911F013091200194 94 | :10E5C0008217930750F42091290130912A012F5F7F 95 | :10E5D0003F4F30932A01209329019093200180938B 96 | :10E5E0001F012BCE0FB6F894A8958091600088612A 97 | :10E5F00080936000109260000FBEEE27FF27099401 98 | :10E6000080E090E0C95FDE4FDEBFCDBF0895F8CC5B 99 | :10E61000109285001092840010922A011092290114 100 | :10E62000A89508958091C00087FFFCCF8091C0001D 101 | :10E6300084FD01C0A8958091C60008959091C00006 102 | :10E6400095FFFCCF8093C6000895ECDF803239F04F 103 | :10E6500088E18093600088E080936000FFCF84E1D0 104 | :10E66000EDCFCF93C82FDEDFC150E9F7CF91EDCFCB 105 | :10E6700020E52CBD2C982FE02EBD0DB407FEFDCF5C 106 | :10E68000292F33272EBD0DB407FEFDCF8EBD0DB44F 107 | :10E6900007FEFDCF1EBC0DB407FEFDCF2C9A8EB534 108 | :10E6A0001CBC08950F931F93CF93DF938C01D62F3B 109 | :10E6B000DFDFC82F6D2FC8010196DADF2C2F30E085 110 | :10E6C000322F2227A901482BCA01DF91CF911F9138 111 | :10E6D0000F91089520E52CBD2C9820EF2EBD0DB490 112 | :10E6E00007FEFDCF292F33272EBD0DB407FEFDCF2A 113 | :10E6F0008EBD0DB407FEFDCF4EBD0DB407FEFDCFA0 114 | :10E700002C9A1CBC08950F931F93CF93DF93EC01B9 115 | :10E710008B01472F55276CE6CE01DCDF402F6CE6DE 116 | :10E72000CE010196DF91CF911F910F91D3CFCF935F 117 | :10E73000DF93EC0140E16CE681E097E0CBDF68E637 118 | :10E7400081E097E095DF8111FACF4FEF6CE682E030 119 | :10E7500097E0C0DF42E06CE680E097E0BBDFBE01FF 120 | :10E7600084E097E0D0DF41E06CE681E097E0B2DF43 121 | :10E7700068E681E097E07CDF8111FACF68E683E00C 122 | :10E7800097E076DF823229F040E16CE681E097E0A5 123 | :10E79000A1DF68E683E097E06BDF8232B1F6DF91BC 124 | :10E7A000CF910895CF9385E490E0C1DF87E190E0B9 125 | :10E7B00088D18B3B91F489E190E083D1C82F88E127 126 | :10E7C00090E07FD12C2F30E0322F2227280F311DEF 127 | :10E7D000309328012093270106C089E797EB909397 128 | :10E7E000280180932701CF9108952F923F924F9255 129 | :10E7F0005F926F927F928F929F92AF92BF92CF92D1 130 | :10E80000DF92EF92FF920F931F93CF93DF93CDB7D9 131 | :10E81000DEB7CC50D240DEBFCDBF68E688E297E0DD 132 | :10E8200041DF009711F480E098E79E012F5F3F4F92 133 | :10E8300079015E0133EFA31A3DEFB30A8701A016F9 134 | :10E84000B10691F06C014FEFC41AD40A60E010DFFA 135 | :10E85000F80181938F01C114F0E8DF0619F4C12C8F 136 | :10E8600088E7D82EC601EBCFBC0188E297E04BDFEA 137 | :10E8700040E46CE681E097E02DDF68E681E097E018 138 | :10E88000F7DE8111FACF0CE017E0F70141917F012B 139 | :10E890006CE6C8011FDF0F5F1F4F0231F7E01F0753 140 | :10E8A000A1F72F8130E0322F222788857901E80EE9 141 | :10E8B000F11C898590E0982F88272A85820F911D69 142 | :10E8C0000B8510E0102F00272C85020F111D8330BF 143 | :10E8D000910579F4093F1105A8F5809125019091E2 144 | :10E8E00026010817190770F101968017910750F15A 145 | :10E8F00024C025E0E21622E0F20620F584309105DE 146 | :10E90000CCF48130910529F10297E1F481DE6FEFBB 147 | :10E9100082E090E0DED0809127019091280107DF0E 148 | :10E9200010922601109225011092240110922301C9 149 | :10E9300012E0A5C006976CF005C025E0E21622E0C3 150 | :10E94000F20648F08091270190912801F0DE11E055 151 | :10E9500096C010E094C05CDE9701245031091093FA 152 | :10E9600024010093230101501109C801880F892F48 153 | :10E97000881F990B9195A0E0B0E0BC015527442772 154 | :10E98000C801A0E0B0E0E9E0880F991FAA1FBB1FF3 155 | :10E99000EA95D1F7AA27BB27842B952BA62BB72B5B 156 | :10E9A000AC01BD01420F531F611D711D4130504F1D 157 | :10E9B0006140710508F062C02115F2E03F0710F4D4 158 | :10E9C00014E001C012E0222319F02F5F3F4FFBCF6C 159 | :10E9D0007E014EE0E40EF11C40E050E001E04C010D 160 | :10E9E0005D0161E0961AA108B10863E0D62E75E0DA 161 | :10E9F000C72EE1E13E2E4217530708F038C02C0124 162 | :10EA00003D01440E551E611C711CF7013197608158 163 | :10EA1000F701208070E072290B01F20160925B0027 164 | :10EA200000935700E89511244E5F5F4F41111BC0C2 165 | :10EA300024013501440E551E611C711CF2016092C7 166 | :10EA40005B00D0925700E89507B600FCFDCFF201BD 167 | :10EA500060925B00C0925700E89507B600FCFDCFBE 168 | :10EA600030925700E895F2E0EF0EF11CC4CF14305D 169 | :10EA700031F46EEE82E090E02CD001C013E0812FE3 170 | :10EA8000C45FDD4FDEBFCDBFDF91CF911F910F91EE 171 | :10EA9000FF90EF90DF90CF90BF90AF909F908F90BE 172 | :10EAA0007F906F905F904F903F902F9008956BBF35 173 | :10EAB000FA01DC0102C007900D9221503040D8F7D6 174 | :10EAC0000895F999FECF92BD81BDF89A992780B536 175 | :10EAD0000895262FF999FECF1FBA92BD81BD20BDA2 176 | :10EAE0000FB6F894FA9AF99A0FBE01960895F89421 177 | :02EAF000FFCF56 178 | :10EAF20080C0A801FEFFFFFF00DEADBEEFFEEDC04D 179 | :0CEB0200A801800000000007D0805555DD 180 | :040000031000E00009 181 | :00000001FF 182 | -------------------------------------------------------------------------------- /hardware/ariadne/avr/bootloaders/ariadne/ariadne_atmega328_ethernet.hex: -------------------------------------------------------------------------------- 1 | :1070000043C00000ACC20000AAC20000A8C2000039 2 | :10701000A6C20000A4C20000A2C20000A0C20000DC 3 | :107020009EC200009CC200009AC2000098C20000EC 4 | :1070300096C2000094C2000092C2000090C20000FC 5 | :107040008EC200008CC200008AC2000088C200000C 6 | :1070500086C2000084C2000082C2000080C200001C 7 | :107060007EC200007CC200000005000346756C6C07 8 | :1070700000000500044F70636F64653F0000050069 9 | :10708000004572726F72000011241FBECFEFD8E06E 10 | :10709000DEBFCDBF11E0A0E0B1E0EEEFF9E702C046 11 | :1070A00005900D92AC31B107D9F721E0ACE1B1E028 12 | :1070B00001C01D92AB32B207E1F701D09EC4CDB73B 13 | :1070C000DEB7C150D140DEBFCDBF14BE0FB6F894BD 14 | :1070D000A8958091600088618093600010926000A4 15 | :1070E0000FBE99E288E10FB6F894A89580936000EE 16 | :1070F0000FBE909360002FEF83EC99E02150804009 17 | :107100009040E1F700C00000112484E080938100EA 18 | :1071100080E090E05CD4882321F060E080E090E0A3 19 | :107120005ED481E090E053D4843021F064E081E0CB 20 | :1071300090E055D482E08093C00088E18093C10044 21 | :1071400086E08093C20080E18093C4008CE385B91F 22 | :107150008CE284B95C9A549A299A219A81E08DBD77 23 | :1071600083E090E034D4853539F050E0E52E51E0ED 24 | :10717000F52E00E010E016C084E090E028D48A3AB2 25 | :10718000A1F741E0E42E41E0F42E05E010E0C80153 26 | :107190001ED4F70181937F010F5F1F4F0731110547 27 | :1071A000B1F7E3CFF70141917F0160E0C8013AD226 28 | :1071B0000F5F1F4F0C311105A9F79CD210922201CD 29 | :1071C00010922101DD24D3948E010F5F1F4F4E01D9 30 | :1071D000F1E88F0E911C23E0C22EA12CB12C32E0DD 31 | :1071E000332E8091220181119FC068E686E297E0EC 32 | :1071F00001D2892B09F498C0D092210168E682E07F 33 | :1072000097E0DED182FF0FC044E06CE682E097E0B9 34 | :1072100009D22FEF87E893E1215080409040E1F7B9 35 | :1072200000C00000EBCF89D2282E60E084E297E016 36 | :10723000E1D1985A7C01E2E02E1629F1E21520F006 37 | :10724000F1E02F1681F006C023E02216A1F084E0C1 38 | :10725000281641F14AE050E06DE770E7C801AED36F 39 | :107260002AE0280146C04CE050E061E770E7C80121 40 | :10727000A5D32CE0F6CF49E050E068E670E7C801FE 41 | :107280009DD329E0EECF809123019091240120919C 42 | :107290002501309126012817390720F49093260103 43 | :1072A00080932501198294E09A8380912301909123 44 | :1072B00024019B838C8324E0D4CFF20141912F01E0 45 | :1072C0003701FFEF6F1A7F0A64E7C701CF5FDE4F18 46 | :1072D0002883C150D140A6D1CF5FDE4F2881C15055 47 | :1072E000D140611480E6780619F4612C98E5792E76 48 | :1072F0007301215010F7B701785584E297E0ABD1C4 49 | :1073000040E26CE681E097E08DD168E681E097E0AD 50 | :1073100057D18111FACF94E0291206C040E16CE602 51 | :1073200081E097E07FD106C1809121018111C4C025 52 | :107330008091C00087FFC0C013D1D09222011AD122 53 | :107340008134B9F417D1CF5FDE4F8883C150D1406B 54 | :1073500024D1CF5FDE4F8881C150D140823811F4F3 55 | :1073600084E003C0813819F480E010D1A3C083E029 56 | :10737000FCCF823411F484E103C0853419F484E035 57 | :1073800018D198C0853569F4F5D0F82EF3D02F2D9B 58 | :1073900030E0382B220F331F30931E0120931D0144 59 | :1073A00088C0863519F484E004D1DECF843609F034 60 | :1073B00051C0E0D0DFD080931C01DCD0E0901D01F3 61 | :1073C000F0901E01E114E0E7FE0620F4F701C09200 62 | :1073D0005700E8953801CED0F30181933F018091A9 63 | :1073E0001C01815080931C018111F5CFE114F0E75D 64 | :1073F000FF0620F0F701C0925700E895CED007B6FF 65 | :1074000000FCFDCF8981D8019701201B310BBD0104 66 | :10741000620F731F1296AD0141505109FA0140816C 67 | :1074200090E0942BFB010C01D0925700E8951124B9 68 | :10743000A815B90511F08C91EACF25E0F70120934A 69 | :107440005700E89507B600FCFDCF81E18093570017 70 | :10745000E89530C08437D1F48DD08CD080931C0156 71 | :1074600089D09BD0E0911D01F0911E01CF010196C2 72 | :1074700090931E0180931D01849188D080911C01FE 73 | :10748000815080931C018111EDCF14C0853739F4F0 74 | :1074900084D08EE17BD085E979D08FE066CF8135CD 75 | :1074A00041F47BD06EEE82E090E099D280E16ED024 76 | :1074B00041C073D080E16AD0F50185919491019625 77 | :1074C000B9F08091290190912A010A9788F082E011 78 | :1074D00090E07DD28E3E71F180912101813041F4A6 79 | :1074E000F501C0925700E89505D13AD010922101DC 80 | :1074F000A895809184009091850094FF04C025B1E7 81 | :10750000232525B901C0299820911F013091200120 82 | :107510008217930750F42091290130912A012F5F9F 83 | :107520003F4F30932A0120932901909320018093AB 84 | :107530001F0157CE0FB6F894A8958091600088611E 85 | :1075400080936000109260000FBEEE27FF27099421 86 | :1075500080E090E0CF5FDE4FDEBFCDBF089550CD1D 87 | :10756000109285001092840010922A011092290135 88 | :10757000A89508958091C00087FFFCCF8091C0003E 89 | :1075800084FD01C0A8958091C60008959091C00027 90 | :1075900095FFFCCF8093C6000895ECDF803239F070 91 | :1075A00088E18093600088E080936000FFCF84E1F1 92 | :1075B000EDCFCF93C82FDEDFC150E9F7CF91EDCFEC 93 | :1075C00020E52CBD2A982FE02EBD0DB407FEFDCF7F 94 | :1075D000292F33272EBD0DB407FEFDCF8EBD0DB470 95 | :1075E00007FEFDCF1EBC0DB407FEFDCF2A9A8EB557 96 | :1075F0001CBC08950F931F93CF93DF938C01D62F5C 97 | :10760000DFDFC82F6D2FC8010196DADF2C2F30E0A5 98 | :10761000322F2227A901482BCA01DF91CF911F9158 99 | :107620000F91089520E52CBD2A9820EF2EBD0DB4B2 100 | :1076300007FEFDCF292F33272EBD0DB407FEFDCF4A 101 | :107640008EBD0DB407FEFDCF4EBD0DB407FEFDCFC0 102 | :107650002A9A1CBC08950F931F93CF93DF93EC01DC 103 | :107660008B01472F55276CE6CE01DCDF402F6CE6FF 104 | :10767000CE010196DF91CF911F910F91D3CFCF9380 105 | :10768000DF93EC0140E16CE681E097E0CBDF68E658 106 | :1076900081E097E095DF8111FACF4FEF6CE682E051 107 | :1076A00097E0C0DF42E06CE680E097E0BBDFBE0120 108 | :1076B00084E097E0D0DF41E06CE681E097E0B2DF64 109 | :1076C00068E681E097E07CDF8111FACF68E683E02D 110 | :1076D00097E076DF823229F040E16CE681E097E0C6 111 | :1076E000A1DF68E683E097E06BDF8232B1F6DF91DD 112 | :1076F000CF910895CF9385E490E0C1DF87E190E0DA 113 | :1077000066D18B3B91F489E190E061D1C82F88E18B 114 | :1077100090E05DD12C2F30E0322F2227280F311D31 115 | :10772000309328012093270106C089E797EB9093B7 116 | :10773000280180932701CF910895AF92BF92CF92F5 117 | :10774000DF92EF92FF920F931F93CF93DF93CDB70A 118 | :10775000DEB7CD50D240DEBFCDBF68E688E297E00D 119 | :1077600049DF009711F480E098E79E012F5F3F4FBB 120 | :1077700079015E0133EFA31A3DEFB30A8701A0162A 121 | :10778000B10691F06C014FEFC41AD40A60E018DF23 122 | :10779000F80181938F01C114F0E8DF0619F4C12CC0 123 | :1077A00098E7D92EC601EBCFBC0188E297E053DF02 124 | :1077B00040E46CE681E097E035DF68E681E097E041 125 | :1077C000FFDE8111FACF0CE017E0F70141917F0154 126 | :1077D0006CE6C80127DF0F5F1F4F0231F7E01F077C 127 | :1077E000A1F78F8190E0982F882728857C01E20EF1 128 | :1077F000F11C298530E0322F22278A85280F311D80 129 | :107800000B8510E0102F00278C85080F111D2330E9 130 | :10781000310579F409331105B8F58091250190916E 131 | :1078200026010817190780F101968017910760F16A 132 | :1078300026C045E0E41642E0F40630F52430310578 133 | :10784000D4F42130310539F122303105E9F488DEF4 134 | :107850006FEF82E090E0C3D08091270190912801E2 135 | :107860000EDF109226011092250110922401109231 136 | :10787000230122E093C0263031056CF005C0F5E00D 137 | :10788000EF16F2E0FF0648F0809127019091280161 138 | :10789000F6DE21E083C020E081C062DEC7010497EC 139 | :1078A000109324010093230101501109102F002788 140 | :1078B000110F9C01200F311F2130304708F06BC0A1 141 | :1078C0008115F2E09F0710F424E001C022E0AC0132 142 | :1078D0004F775527452B11F00196F9CF011511056A 143 | :1078E00099F4FE013E96AE014E5B5F4FDF011197AA 144 | :1078F0003C913C3009F051C03081343909F04DC021 145 | :107900003496E417F50791F7DE011E9660E070E00B 146 | :1079100031E043E0F42E55E0E52EE1E1DE2E68177C 147 | :10792000790740F5FD0131974081EC9150E05E2BE5 148 | :10793000F8010A0130935700E89511246E5F7F4FDC 149 | :10794000AB014F775527452B89F4EE57F109F0929B 150 | :107950005700E89507B600FCFDCFE0925700E89588 151 | :1079600007B600FCFDCFD0925700E89512960E5F47 152 | :107970001F4FD5CF243091F46EEE82E090E0C35FCC 153 | :10798000DD4F2883CD50D2402AD0C35FDD4F288100 154 | :10799000CD50D24003C023E001C025E0822FC35F59 155 | :1079A000DD4FDEBFCDBFDF91CF911F910F91FF90D3 156 | :1079B000EF90DF90CF90BF90AF900895FB01DC0176 157 | :1079C00002C005900D9241505040D8F70895F999A2 158 | :1079D000FECF92BD81BDF89A992780B50895262FD4 159 | :1079E000F999FECF1FBA92BD81BD20BD0FB6F894A4 160 | :0E79F000FA9AF99A0FBE01960895F894FFCF07 161 | :1079FE0080C0A801FEFFFFFF00DEADBEEFFEEDC0B2 162 | :0C7A0E00A801800000000007D080555542 163 | :040000030000700089 164 | :00000001FF 165 | -------------------------------------------------------------------------------- /hardware/ariadne/avr/bootloaders/ariadne/ariadne_atmega328_w5100.hex: -------------------------------------------------------------------------------- 1 | :1070000043C00000AAC20000A8C20000A6C200003F 2 | :10701000A4C20000A2C20000A0C200009EC20000E4 3 | :107020009CC200009AC2000098C2000096C20000F4 4 | :1070300094C2000092C2000090C200008EC2000004 5 | :107040008CC200008AC2000088C2000086C2000014 6 | :1070500084C2000082C2000080C200007EC2000024 7 | :107060007CC200007AC200000005000346756C6C0B 8 | :1070700000000500044F70636F64653F0000050069 9 | :10708000004572726F72000011241FBECFEFD8E06E 10 | :10709000DEBFCDBF11E0A0E0B1E0EAEFF9E702C04A 11 | :1070A00005900D92AC31B107D9F721E0ACE1B1E028 12 | :1070B00001C01D92AB32B207E1F701D09CC4CDB73D 13 | :1070C000DEB7C150D140DEBFCDBF14BE0FB6F894BD 14 | :1070D000A8958091600088618093600010926000A4 15 | :1070E0000FBE99E288E10FB6F894A89580936000EE 16 | :1070F0000FBE909360002FEF83EC99E02150804009 17 | :107100009040E1F700C00000112484E080938100EA 18 | :1071100080E090E05AD4882321F060E080E090E0A5 19 | :107120005CD481E090E051D4843021F064E081E0CF 20 | :1071300090E053D482E08093C00088E18093C10046 21 | :1071400086E08093C20080E18093C4008CE385B91F 22 | :107150008CE284B95C9A549A81E08DBD83E090E022 23 | :1071600034D4853539F050E0E52E51E0F52E00E0BD 24 | :1071700010E016C084E090E028D48A3AA1F741E0FC 25 | :10718000E42E41E0F42E05E010E0C8011ED4F70122 26 | :1071900081937F010F5F1F4F07311105B1F7E3CFD7 27 | :1071A000F70141917F0160E0C8013AD20F5F1F4FA4 28 | :1071B0000C311105A9F79CD21092220110922101E5 29 | :1071C000DD24D3948E010F5F1F4F4E01F1E88F0E27 30 | :1071D000911C21E1322E33E0C32EA12CB12C8091E1 31 | :1071E000220181119FC068E686E297E001D2892BD7 32 | :1071F00009F498C0D092210168E682E097E0DED1E0 33 | :1072000082FF0FC044E06CE682E097E009D22FEFE6 34 | :1072100087E893E1215080409040E1F700C00000F2 35 | :10722000EBCF89D2282E60E084E297E0E1D1985A32 36 | :107230007C01E2E02E1629F1E21520F0F1E02F1694 37 | :1072400081F006C023E02216A1F084E0281641F167 38 | :107250004AE050E06DE770E7C801AED32AE02801AC 39 | :1072600046C04CE050E061E770E7C801A5D32CE0D0 40 | :10727000F6CF49E050E068E670E7C8019DD329E009 41 | :10728000EECF80912301909124012091250130912E 42 | :1072900026012817390720F49093260180932501B1 43 | :1072A000198294E09A8380912301909124019B8319 44 | :1072B0008C8324E0D4CFF20141912F013701FFEFFD 45 | :1072C0006F1A7F0A64E7C701CF5FDE4F2883C15082 46 | :1072D000D140A6D1CF5FDE4F2881C150D14061148B 47 | :1072E00080E6780619F4612C98E5792E7301215017 48 | :1072F00010F7B701785584E297E0ABD140E26CE635 49 | :1073000081E097E08DD168E681E097E057D1811167 50 | :10731000FACF94E0291206C040E16CE681E097E0E4 51 | :107320007FD106C1809121018111C3C08091C0002D 52 | :1073300087FFBFC013D1D09222011AD18134B9F492 53 | :1073400017D1CF5FDE4F8883C150D14024D1CF5FAA 54 | :10735000DE4F8881C150D140823811F484E003C0EF 55 | :10736000813819F480E010D1A2C083E0FCCF8234D0 56 | :1073700011F484E103C0853419F484E018D197C076 57 | :10738000853569F4F5D0F82EF3D02F2D30E0382B69 58 | :10739000220F331F30931E0120931D0187C08635B5 59 | :1073A00019F484E004D1DECF843609F050C0E0D077 60 | :1073B000DFD080931C01DCD0E0901D01F0901E0115 61 | :1073C000E114E0E7FE0620F4F701C0925700E895CB 62 | :1073D0003801CED0F30181933F0180911C0181508F 63 | :1073E00080931C018111F5CFE114F0E7FF0620F036 64 | :1073F000F701C0925700E895CED007B600FCFDCF4C 65 | :107400008981D8019701201B310BBD01620F731FC9 66 | :107410001296AD0141505109FA01408190E0942B40 67 | :10742000FB010C01D0925700E8951124A815B9056D 68 | :1074300011F08C91EACF25E0F70120935700E895F1 69 | :1074400007B600FCFDCF30925700E89530C0843776 70 | :10745000D1F48ED08DD080931C018AD09CD0E09145 71 | :107460001D01F0911E01CF01019690931E018093A2 72 | :107470001D01849189D080911C01815080931C0151 73 | :107480008111EDCF14C0853739F485D08EE17CD0E1 74 | :1074900085E97AD08FE067CF813541F47CD06EEEFC 75 | :1074A00082E090E09AD280E16FD042C074D080E157 76 | :1074B0006BD0F501859194910196B9F080912901E5 77 | :1074C00090912A010A9788F082E090E07ED28E3E69 78 | :1074D00079F180912101813041F4F501C09257008A 79 | :1074E000E89506D13BD010922101A89580918400A7 80 | :1074F0009091850094FF05C035B120E2232725B97E 81 | :1075000001C02D9820911F0130912001821793070F 82 | :1075100050F42091290130912A012F5F3F4F309381 83 | :107520002A01209329019093200180931F0157CEB7 84 | :107530000FB6F894A89580916000886180936000F0 85 | :10754000109260000FBEEE27FF27099480E090E0C4 86 | :10755000CF5FDE4FDEBFCDBF089552CD10928500C4 87 | :107560001092840010922A0110922901A895089582 88 | :107570008091C00087FFFCCF8091C00084FD01C0D6 89 | :10758000A8958091C60008959091C00095FFFCCF0A 90 | :107590008093C6000895ECDF803239F088E1809353 91 | :1075A000600088E080936000FFCF84E1EDCFCF934F 92 | :1075B000C82FDEDFC150E9F7CF91EDCF20E52CBD1C 93 | :1075C0002A982FE02EBD0DB407FEFDCF292F3327BB 94 | :1075D0002EBD0DB407FEFDCF8EBD0DB407FEFDCF51 95 | :1075E0001EBC0DB407FEFDCF2A9A8EB51CBC0895B3 96 | :1075F0000F931F93CF93DF938C01D62FDFDFC82F1C 97 | :107600006D2FC8010196DADF2C2F30E0322F2227B0 98 | :10761000A901482BCA01DF91CF911F910F910895C5 99 | :1076200020E52CBD2A9820EF2EBD0DB407FEFDCF1E 100 | :10763000292F33272EBD0DB407FEFDCF8EBD0DB40F 101 | :1076400007FEFDCF4EBD0DB407FEFDCF2A9A1CBC30 102 | :1076500008950F931F93CF93DF93EC018B01472F76 103 | :1076600055276CE6CE01DCDF402F6CE6CE0101969B 104 | :10767000DF91CF911F910F91D3CFCF93DF93EC0187 105 | :1076800040E16CE681E097E0CBDF68E681E097E0DF 106 | :1076900095DF8111FACF4FEF6CE682E097E0C0DF13 107 | :1076A00042E06CE680E097E0BBDFBE0184E097E05B 108 | :1076B000D0DF41E06CE681E097E0B2DF68E681E090 109 | :1076C00097E07CDF8111FACF68E683E097E076DF10 110 | :1076D000823229F040E16CE681E097E0A1DF68E6C4 111 | :1076E00083E097E06BDF8232B1F6DF91CF910895AE 112 | :1076F000CF9385E490E0C1DF87E190E066D18B3BDA 113 | :1077000091F489E190E061D1C82F88E190E05DD1EA 114 | :107710002C2F30E0322F2227280F311D30932801E3 115 | :107720002093270106C089E797EB90932801809367 116 | :107730002701CF910895AF92BF92CF92DF92EF923F 117 | :10774000FF920F931F93CF93DF93CDB7DEB7CD504A 118 | :10775000D240DEBFCDBF68E688E297E049DF009700 119 | :1077600011F480E098E79E012F5F3F4F79015E01A1 120 | :1077700033EFA31A3DEFB30A8701A016B10691F0CB 121 | :107780006C014FEFC41AD40A60E018DFF80181934E 122 | :107790008F01C114F0E8DF0619F4C12C98E7D92E47 123 | :1077A000C601EBCFBC0188E297E053DF40E46CE612 124 | :1077B00081E097E035DF68E681E097E0FFDE811148 125 | :1077C000FACF0CE017E0F70141917F016CE6C801A8 126 | :1077D00027DF0F5F1F4F0231F7E01F07A1F78F81EF 127 | :1077E00090E0982F882728857C01E20EF11C2985DE 128 | :1077F00030E0322F22278A85280F311D0B8510E0BB 129 | :10780000102F00278C85080F111D2330310579F4C6 130 | :1078100009331105B8F580912501909126010817CB 131 | :10782000190780F101968017910760F126C045E0A5 132 | :10783000E41642E0F40630F524303105D4F421306A 133 | :10784000310539F122303105E9F488DE6FEF82E04D 134 | :1078500090E0C3D080912701909128010EDF109213 135 | :10786000260110922501109224011092230122E09A 136 | :1078700093C0263031056CF005C0F5E0EF16F2E05C 137 | :10788000FF0648F08091270190912801F6DE21E063 138 | :1078900083C020E081C062DEC701049710932401F9 139 | :1078A0000093230101501109102F0027110F9C0193 140 | :1078B000200F311F2130304708F06BC08115F2E0F6 141 | :1078C0009F0710F424E001C022E0AC014F77552758 142 | :1078D000452B11F00196F9CF0115110599F4FE0120 143 | :1078E0003E96AE014E5B5F4FDF0111973C913C30FD 144 | :1078F00009F051C03081343909F04DC03496E41795 145 | :10790000F50791F7DE011E9660E070E031E043E09C 146 | :10791000F42E55E0E52EE1E1DE2E6817790740F5FB 147 | :10792000FD0131974081EC9150E05E2BF8010A0196 148 | :1079300030935700E89511246E5F7F4FAB014F776E 149 | :107940005527452B89F4EE57F109F0925700E89539 150 | :1079500007B600FCFDCFE0925700E89507B600FCA3 151 | :10796000FDCFD0925700E89512960E5F1F4FD5CFEE 152 | :10797000243091F46EEE82E090E0C35FDD4F288307 153 | :10798000CD50D2402AD0C35FDD4F2881CD50D240A8 154 | :1079900003C023E001C025E0822FC35FDD4FDEBFBF 155 | :1079A000CDBFDF91CF911F910F91FF90EF90DF90AE 156 | :1079B000CF90BF90AF900895FB01DC0102C005900D 157 | :1079C0000D9241505040D8F70895F999FECF92BDDD 158 | :1079D00081BDF89A992780B50895262FF999FECF91 159 | :1079E0001FBA92BD81BD20BD0FB6F894FA9AF99ADC 160 | :0A79F0000FBE01960895F894FFCF32 161 | :1079FA0080C0A801FEFFFFFF00DEADBEEFFEEDC0B6 162 | :0C7A0A00A801800000000007D080555546 163 | :040000030000700089 164 | :00000001FF 165 | -------------------------------------------------------------------------------- /hardware/ariadne/avr/bootloaders/ariadne/ariadne_atmega328_w5200.hex: -------------------------------------------------------------------------------- 1 | :1070000043C00000BAC20000B8C20000B6C200000F 2 | :10701000B4C20000B2C20000B0C20000AEC20000A4 3 | :10702000ACC20000AAC20000A8C20000A6C20000B4 4 | :10703000A4C20000A2C20000A0C200009EC20000C4 5 | :107040009CC200009AC2000098C2000096C20000D4 6 | :1070500094C2000092C2000090C200008EC20000E4 7 | :107060008CC200008AC200000005000346756C6CEB 8 | :1070700000000500044F70636F64653F0000050069 9 | :10708000004572726F72000011241FBECFEFD8E06E 10 | :10709000DEBFCDBF11E0A0E0B1E0ECE2FAE702C054 11 | :1070A00005900D92AC31B107D9F721E0ACE1B1E028 12 | :1070B00001C01D92AB32B207E1F701D0B5C4CDB724 13 | :1070C000DEB7C150D140DEBFCDBF14BE0FB6F894BD 14 | :1070D000A8958091600088618093600010926000A4 15 | :1070E0000FBE99E288E10FB6F894A89580936000EE 16 | :1070F0000FBE909360002FEF83EC99E02150804009 17 | :107100009040E1F700C00000112484E080938100EA 18 | :1071100080E090E073D4882321F060E080E090E08C 19 | :1071200075D481E090E06AD4843021F064E081E09D 20 | :1071300090E06CD482E08093C00088E18093C1002D 21 | :1071400086E08093C20080E18093C4008CE385B91F 22 | :107150008CE284B95C9A549A81E08DBD83E090E022 23 | :107160004DD4853539F050E0E52E51E0F52E00E0A4 24 | :1071700010E016C084E090E041D48A3AA1F741E0E3 25 | :10718000E42E41E0F42E05E010E0C80137D4F70109 26 | :1071900081937F010F5F1F4F07311105B1F7E3CFD7 27 | :1071A000F70141917F0160E0C8014ED20F5F1F4F90 28 | :1071B0000A311105A9F70FE110E442E060E0C801CF 29 | :1071C00043D242E060E0C80101973ED213950F31EF 30 | :1071D000F8E41F0791F7A5D2109222011092210125 31 | :1071E000DD24D3948E010F5F1F4F4E0121E8820EE4 32 | :1071F000911C21E1322E33E0C32EA12CB12C8091C1 33 | :10720000220181119FC068E686E293E405D2892BB2 34 | :1072100009F498C0D092210168E682E093E4DED1BF 35 | :1072200082FF0FC044E06CE682E093E40DD28FEF62 36 | :1072300097E8E3E181509040E040E1F700C00000B2 37 | :10724000EBCF92D2282E60E084E293E4E5D1985609 38 | :107250007C01F2E02F1629F1F21520F021E0221630 39 | :1072600081F006C083E02816A1F094E0291641F1D0 40 | :107270004AE050E06DE770E7C801B7D32AE0280183 41 | :1072800046C04CE050E061E770E7C801AED32CE0A7 42 | :10729000F6CF49E050E068E670E7C801A6D329E0E0 43 | :1072A000EECF80912301909124012091250130910E 44 | :1072B00026012817390720F4909326018093250191 45 | :1072C0001982E4E0EA8380912301909124019B8359 46 | :1072D0008C8324E0D4CFF20141912F013701FFEFDD 47 | :1072E0006F1A7F0A64E7C701CF5FDE4F2883C15062 48 | :1072F000D140AAD1CF5FDE4F2881C150D140611467 49 | :1073000080EA780619F4612C98E9792E73012150EE 50 | :1073100010F7B701785984E293E4B4D140E26CE607 51 | :1073200081E093E491D168E681E093E457D1811143 52 | :10733000FACF94E0291206C040E16CE681E093E4C4 53 | :1073400083D106C1809121018111C3C08091C00009 54 | :1073500087FFBFC013D1D09222011AD18134B9F472 55 | :1073600017D1CF5FDE4F8883C150D14024D1CF5F8A 56 | :10737000DE4F8881C150D140823811F484E003C0CF 57 | :10738000813819F480E010D1A2C083E0FCCF8234B0 58 | :1073900011F484E103C0853419F484E018D197C056 59 | :1073A000853569F4F5D0F82EF3D02F2D30E0382B49 60 | :1073B000220F331F30931E0120931D0187C0863595 61 | :1073C00019F484E004D1DECF843609F050C0E0D057 62 | :1073D000DFD080931C01DCD0E0901D01F0901E01F5 63 | :1073E000E114E0E7FE0620F4F701C0925700E895AB 64 | :1073F0003801CED0F30181933F0180911C0181506F 65 | :1074000080931C018111F5CFE114F0E7FF0620F015 66 | :10741000F701C0925700E895CED007B600FCFDCF2B 67 | :107420008981D8019701201B310BBD01620F731FA9 68 | :107430001296AD0141505109FA01408190E0942B20 69 | :10744000FB010C01D0925700E8951124A815B9054D 70 | :1074500011F08C91EACF25E0F70120935700E895D1 71 | :1074600007B600FCFDCF30925700E89530C0843756 72 | :10747000D1F48ED08DD080931C018AD09CD0E09125 73 | :107480001D01F0911E01CF01019690931E01809382 74 | :107490001D01849189D080911C01815080931C0131 75 | :1074A0008111EDCF14C0853739F485D08EE17CD0C1 76 | :1074B00085E97AD08FE067CF813541F47CD06EEEDC 77 | :1074C00082E090E0A3D280E16FD042C074D080E12E 78 | :1074D0006BD0F501859194910196B9F080912901C5 79 | :1074E00090912A010A9788F082E090E087D28E3E40 80 | :1074F00079F180912101813041F4F501C09257006A 81 | :10750000E8950FD13BD010922101A895809184007D 82 | :107510009091850094FF05C035B120E2232725B95D 83 | :1075200001C02D9820911F013091200182179307EF 84 | :1075300050F42091290130912A012F5F3F4F309361 85 | :107540002A01209329019093200180931F0157CE97 86 | :107550000FB6F894A89580916000886180936000D0 87 | :10756000109260000FBEEE27FF27099480E090E0A4 88 | :10757000CF5FDE4FDEBFCDBF089542CD10928500B4 89 | :107580001092840010922A0110922901A895089562 90 | :107590008091C00087FFFCCF8091C00084FD01C0B6 91 | :1075A000A8958091C60008959091C00095FFFCCFEA 92 | :1075B0008093C6000895ECDF803239F088E1809333 93 | :1075C000600088E080936000FFCF84E1EDCFCF932F 94 | :1075D000C82FDEDFC150E9F7CF91EDCF20E52CBDFC 95 | :1075E0002A98292F33272EBD0DB407FEFDCF8EBD5F 96 | :1075F0000DB407FEFDCF1EBC0DB407FEFDCF81E02C 97 | :107600008EBD0DB407FEFDCF1EBC0DB407FEFDCF31 98 | :107610002A9A8EB51CBC08950F931F93CF93DF93C6 99 | :107620008C01D62FDBDFC82F6D2FC8010196D6DF66 100 | :107630002C2F30E0322F2227A901482BCA01DF91DD 101 | :10764000CF911F910F91089520E52CBD2A98292FE5 102 | :1076500033272EBD0DB407FEFDCF8EBD0DB407FE42 103 | :10766000FDCF80E88EBD0DB407FEFDCF81E08EBD5D 104 | :107670000DB407FEFDCF4EBD0DB407FEFDCF2A9A17 105 | :107680001CBC08950F931F93CF93DF93EC018B01E4 106 | :10769000472F55276CE6CE01D7DF402F6CE6CE0191 107 | :1076A0000196DF91CF911F910F91CECFCF93DF93B2 108 | :1076B000EC0140E16CE681E093E4C6DF68E681E03E 109 | :1076C00093E48CDF8111FACF4FEF6CE682E093E414 110 | :1076D000BBDF42E06CE680E093E4B6DFBE0184E00D 111 | :1076E00093E4D0DF41E06CE681E093E4ADDF68E64F 112 | :1076F00081E093E473DF8111FACF68E683E093E4DD 113 | :107700006DDF823229F040E16CE681E093E49CDF9A 114 | :1077100068E683E093E462DF8232B1F6DF91CF91D5 115 | :107720000895CF9385E490E0C1DF87E190E066D1D2 116 | :107730008B3B91F489E190E061D1C82F88E190E022 117 | :107740005DD12C2F30E0322F2227280F311D3093AE 118 | :1077500028012093270106C089E797EB9093280121 119 | :1077600080932701CF910895AF92BF92CF92DF927D 120 | :10777000EF92FF920F931F93CF93DF93CDB7DEB7B6 121 | :10778000CD50D240DEBFCDBF68E688E293E444DF4F 122 | :10779000009711F480E098ED9E012F5F3F4F790133 123 | :1077A0005E0133EFA31A3DEFB30A8701A016B106BD 124 | :1077B00091F06C014FEFC41AD40A60E00FDFF801BA 125 | :1077C00081938F01C114F0EEDF0619F4C12C98EDFE 126 | :1077D000D92EC601EBCFBC0188E293E453DF40E42D 127 | :1077E0006CE681E093E430DF68E681E093E4F6DE66 128 | :1077F0008111FACF0CE013E4F70141917F016CE6AF 129 | :10780000C80122DF0F5F1F4F0231F3E41F07A1F70A 130 | :107810008F8190E0982F882728857C01E20EF11C4B 131 | :10782000298530E0322F22278A85280F311D0B85CC 132 | :1078300010E0102F00278C85080F111D2330310513 133 | :1078400079F409331105B8F580912501909126014D 134 | :107850000817190780F101968017910760F126C07B 135 | :1078600045E0E41642E0F40630F524303105D4F466 136 | :107870002130310539F122303105E9F47FDE6FEF37 137 | :1078800082E090E0C3D080912701909128010EDF23 138 | :1078900010922601109225011092240110922301CA 139 | :1078A00022E093C0263031056CF005C0F5E0EF16FC 140 | :1078B000F2E0FF0648F08091270190912801F6DE62 141 | :1078C00021E083C020E081C059DEC70104971093F6 142 | :1078D00024010093230101501109102F0027110FDB 143 | :1078E0009C01200F311F2130304708F06BC08115FB 144 | :1078F000F2E09F0710F424E001C022E0AC014F77D2 145 | :107900005527452B11F00196F9CF0115110599F472 146 | :10791000FE013E96AE014E5B5F4FDF0111973C9139 147 | :107920003C3009F051C03081343909F04DC03496F3 148 | :10793000E417F50791F7DE011E9660E070E031E094 149 | :1079400043E0F42E55E0E52EE1E1DE2E68177907DD 150 | :1079500040F5FD0131974081EC9150E05E2BF8013C 151 | :107960000A0130935700E89511246E5F7F4FAB01F9 152 | :107970004F775527452B89F4EE57F109F0925700C0 153 | :10798000E89507B600FCFDCFE0925700E89507B6F2 154 | :1079900000FCFDCFD0925700E89512960E5F1F4F66 155 | :1079A000D5CF243091F46EEE82E090E0C35FDD4FDE 156 | :1079B0002883CD50D2402AD0C35FDD4F2881CD50DF 157 | :1079C000D24003C023E001C025E0822FC35FDD4F1A 158 | :1079D000DEBFCDBFDF91CF911F910F91FF90EF9050 159 | :1079E000DF90CF90BF90AF900895FB01DC0102C003 160 | :1079F00005900D9241505040D8F70895F999FECF67 161 | :107A000092BD81BDF89A992780B50895262FF999DE 162 | :107A1000FECF1FBA92BD81BD20BD0FB6F894FA9A71 163 | :0C7A2000F99A0FBE01960895F894FFCF6C 164 | :107A2C0080C0A801FEFFFFFF00DEADBEEFFEEDC083 165 | :0C7A3C00A801800000000007D008000036 166 | :040000030000700089 167 | :00000001FF 168 | -------------------------------------------------------------------------------- /hardware/ariadne/avr/bootloaders/ariadne/ariadne_atmega328_w5500.hex: -------------------------------------------------------------------------------- 1 | :1070000043C00000C0C20000BEC20000BCC20000FD 2 | :10701000BAC20000B8C20000B6C20000B4C200008C 3 | :10702000B2C20000B0C20000AEC20000ACC200009C 4 | :10703000AAC20000A8C20000A6C20000A4C20000AC 5 | :10704000A2C20000A0C200009EC200009CC20000BC 6 | :107050009AC2000098C2000096C2000094C20000CC 7 | :1070600092C2000090C200000005000346756C6CDF 8 | :1070700000000500044F70636F64653F0000050069 9 | :10708000004572726F72000011241FBECFEFD8E06E 10 | :10709000DEBFCDBF11E0A0E0B1E0E2E1FAE702C05F 11 | :1070A00005900D92AC31B107D9F721E0ACE1B1E028 12 | :1070B00001C01D92AB32B207E1F701D0A8C4CDB731 13 | :1070C000DEB7C250D140DEBFCDBF14BE0FB6F894BC 14 | :1070D000A8958091600088618093600010926000A4 15 | :1070E0000FBE99E288E10FB6F894A89580936000EE 16 | :1070F0000FBE909360002FEF83EC99E02150804009 17 | :107100009040E1F700C00000112484E080938100EA 18 | :1071100080E090E066D4882321F060E080E090E099 19 | :1071200068D481E090E05DD4843021F064E081E0B7 20 | :1071300090E05FD482E08093C00088E18093C1003A 21 | :1071400086E08093C20080E18093C4008CE385B91F 22 | :107150008CE284B95C9A549A81E08DBD83E090E022 23 | :1071600040D4853539F040E0E42E41E0F42E00E0D3 24 | :1071700010E016C084E090E034D48A3AA1F731E000 25 | :10718000E32E31E0F32E05E010E0C8012AD4F70128 26 | :1071900081937F010F5F1F4F07311105B1F7E3CFD7 27 | :1071A000F70141917F0164E0C8014DD20F5F1F4F8D 28 | :1071B0000C311105A9F710E0012F0295000F007E98 29 | :1071C000045F42E0602F8EE190E03DD242E0602F0C 30 | :1071D0008FE190E038D21F5F183071F79BD2109288 31 | :1071E000220110922101DD24D3948E010F5F1F4FE5 32 | :1071F0004E01F1E88F0E911C91E1392E23E0C22E51 33 | :10720000A12CB12C809122018111A2C086E290E0D4 34 | :1072100004D2892B09F49CC0D092210168E682E057 35 | :1072200090E0E2D182FF0FC044E06CE682E090E0A3 36 | :107230000AD22FEF87E893E1215080409040E1F798 37 | :1072400000C00000EBCF89D2282E84E290E0E5D187 38 | :107250007C01E2E02E1649F1E21520F0F1E02F1654 39 | :1072600079F006C023E0221699F084E0281661F137 40 | :107270004AE050E06DE770E7C801AAD32AE00FC0EA 41 | :107280004CE050E061E770E7C801A2D32CE007C0F2 42 | :1072900049E050E068E670E7C8019AD329E0380178 43 | :1072A000322F2701401A510A1AC080912301909170 44 | :1072B000240120912501309126012817390720F457 45 | :1072C0009093260180932501198294E09A838091FE 46 | :1072D0002301909124019B838C8324E0E0CFC201A1 47 | :1072E000860D971D3150D0F0F30141913F0164E7C5 48 | :1072F000CE5FDE4F2883C250D140CF5FDE4F388350 49 | :10730000C150D140A0D1CF5FDE4F3881C150D140B4 50 | :10731000CE5FDE4F2881C250D140E1CFB701620F6E 51 | :10732000711D84E290E0A7D140E26CE681E090E03C 52 | :107330008AD168E681E090E057D18111FACFF4E07C 53 | :107340002F1206C040E16CE681E090E07CD106C1DE 54 | :10735000809121018111C3C08091C00087FFBFC00F 55 | :1073600013D1D09222011AD18134B9F417D1CF5F51 56 | :10737000DE4F8883C150D14024D1CF5FDE4F88815A 57 | :10738000C150D140823811F484E003C0813819F42F 58 | :1073900080E010D1A2C083E0FCCF823411F484E1FC 59 | :1073A00003C0853419F484E018D197C0853569F499 60 | :1073B000F5D0F82EF3D02F2D30E0382B220F331FCD 61 | :1073C00030931E0120931D0187C0863519F484E097 62 | :1073D00004D1DECF843609F050C0E0D0DFD08093F6 63 | :1073E0001C01DCD0E0901D01F0901E01E11420E7AB 64 | :1073F000F20620F4F701C0925700E8953801CED08C 65 | :10740000F30181933F0180911C01815080931C0105 66 | :107410008111F5CFE114F0E7FF0620F0F701C092EB 67 | :107420005700E895CED007B600FCFDCF8981D80182 68 | :107430009701201B310BBD01620F731F1296AD0126 69 | :1074400041505109FA01408190E0942BFB010C015D 70 | :10745000D0925700E8951124A815B90511F08C9128 71 | :10746000EACF25E0F70120935700E89507B600FC26 72 | :10747000FDCF30925700E89530C08437D1F48ED0DC 73 | :107480008DD080931C018AD09CD0E0911D01F09199 74 | :107490001E01CF01019690931E0180931D018491DE 75 | :1074A00089D080911C01815080931C018111EDCF06 76 | :1074B00014C0853739F485D08EE17CD085E97AD047 77 | :1074C0008FE067CF813541F47CD06EEE82E090E0B2 78 | :1074D00090D280E16FD042C074D080E16BD0F501D2 79 | :1074E000859194910196B9F08091290190912A019A 80 | :1074F0000A9788F082E090E074D28E3E79F1809114 81 | :107500002101813041F4F501C0925700E89502D184 82 | :107510003BD010922101A895809184009091850024 83 | :1075200094FF05C035B120E2232725B901C02D986D 84 | :1075300020911F01309120018217930750F4209170 85 | :10754000290130912A012F5F3F4F30932A01209368 86 | :1075500029019093200180931F0154CE0FB6F89417 87 | :10756000A89580916000886180936000109260000F 88 | :107570000FBEEE27FF27099480E090E0CE5FDE4F3C 89 | :10758000DEBFCDBF08953CCD1092850010928400DF 90 | :1075900010922A0110922901A89508958091C000A7 91 | :1075A00087FFFCCF8091C00084FD01C0A895809129 92 | :1075B000C60008959091C00095FFFCCF8093C6004F 93 | :1075C0000895ECDF803239F088E18093600088E034 94 | :1075D00080936000FFCF84E1EDCFCF93C82FDEDF33 95 | :1075E000C150E9F7CF91EDCF20E52CBD2A98292F86 96 | :1075F00033272EBD0DB407FEFDCF8EBD0DB407FEA3 97 | :10760000FDCF6EBD0DB407FEFDCF1EBC0DB407FE51 98 | :10761000FDCF2A9A8EB51CBC08950F931F93CF936C 99 | :107620008C0168E6E1DFC82F68E6C8010196DCDF5F 100 | :107630002C2F30E0322F2227A901482BCA01CF91ED 101 | :107640001F910F91089520E52CBD2A98292F3327EB 102 | :107650002EBD0DB407FEFDCF8EBD0DB407FEFDCFD0 103 | :107660006EBD0DB407FEFDCF4EBD0DB407FEFDCFC0 104 | :107670002A9A1CBC08950F931F93CF93DF93EC01BC 105 | :107680008B01472F55276CE6CE01DDDF402F6CE6DE 106 | :10769000CE010196DF91CF911F910F91D4CFCF935F 107 | :1076A000DF93EC0140E16CE681E090E0CCDF68E63E 108 | :1076B00081E090E099DF8111FACF4FEF6CE682E034 109 | :1076C00090E0C1DF42E06CE680E090E0BCDFBE010C 110 | :1076D00084E090E0D0DF41E06CE681E090E0B3DF51 111 | :1076E00068E681E090E080DF8111FACF68E683E010 112 | :1076F00090E07ADF823229F040E16CE681E090E0B0 113 | :10770000A2DF68E683E090E06FDF8232B1F6DF91BE 114 | :10771000CF910895CF9385E490E0C1DF87E190E0B9 115 | :1077200060D18B3B91F489E190E05BD1C82F88E177 116 | :1077300090E057D12C2F30E0322F2227280F311D17 117 | :10774000309328012093270106C089E797EB909397 118 | :10775000280180932701CF9108958F929F92AF9235 119 | :10776000BF92CF92DF92EF92FF920F931F93CF932E 120 | :10777000DF93CDB7DEB7CD50D240DEBFCDBF88E2BC 121 | :1077800090E04BDF8C01CE0101967C015E0193EF0E 122 | :10779000A91A9DEFB90A670148018E189F08C40114 123 | :1077A0008C0D9D1DAC14BD0431F068E71DDFF601A2 124 | :1077B00081936F01F4CFB801645F7D4F88E290E060 125 | :1077C0005ADF40E46CE681E090E03DDF68E681E06E 126 | :1077D00090E00ADF8111FACF0CE010E0F70141914F 127 | :1077E0007F016CE6C8012FDF0F5F1F4F02311105CB 128 | :1077F000A9F78F8190E0982F882728857C01E20ED9 129 | :10780000F11C298530E0322F22278A85280F311D6F 130 | :107810000B8510E0102F00278C85080F111D2330D9 131 | :10782000310579F409331105B8F58091250190915E 132 | :1078300026010817190780F101968017910760F15A 133 | :1078400026C0F5E0EF16F2E0FF0630F524303105F2 134 | :10785000D4F42130310539F122303105E9F494DED8 135 | :107860006FEF82E090E0C5D08091270190912801D0 136 | :1078700016DF109226011092250110922401109219 137 | :10788000230122E093C0263031056CF005C0F5E0FD 138 | :10789000EF16F2E0FF0648F0809127019091280151 139 | :1078A000FEDE21E083C020E081C06EDEC7010497C8 140 | :1078B000109324010093230101501109102F002778 141 | :1078C000110F9C01200F311F2130304708F06BC091 142 | :1078D0008115E2E09E0710F424E001C022E0AC0133 143 | :1078E0004F775527452B11F00196F9CF011511055A 144 | :1078F00099F4FE013E96AE014E5B5F4FDF0111979A 145 | :107900003C913C3009F051C03081343909F04DC010 146 | :107910003496E417F50791F7DE011E9660E070E0FB 147 | :1079200031E043E0F42E55E0E52EE1E1DE2E68176C 148 | :10793000790740F5FD0131974081EC9150E05E2BD5 149 | :10794000F8010A0130935700E89511246E5F7F4FCC 150 | :10795000AB014F775527452B89F4EE57F109F0928B 151 | :107960005700E89507B600FCFDCFE0925700E89578 152 | :1079700007B600FCFDCFD0925700E89512960E5F37 153 | :107980001F4FD5CF243091F46EEE82E090E0C35FBC 154 | :10799000DD4F2883CD50D2402CD0C35FDD4F2881EE 155 | :1079A000CD50D24003C023E001C025E0822FC35F49 156 | :1079B000DD4FDEBFCDBFDF91CF911F910F91FF90C3 157 | :1079C000EF90DF90CF90BF90AF909F908F900895F1 158 | :1079D000FB01DC0102C005900D9241505040D8F7E8 159 | :1079E0000895F999FECF92BD81BDF89A992780B587 160 | :1079F0000895262FF999FECF1FBA92BD81BD20BDF3 161 | :107A00000FB6F894FA9AF99A0FBE01960895F89471 162 | :027A1000FFCFA6 163 | :107A120080C0A801FEFFFFFF00DEADBEEFFEEDC09D 164 | :0C7A2200A8018000000000000007D00850 165 | :040000030000700089 166 | :00000001FF 167 | -------------------------------------------------------------------------------- /hardware/ariadne/avr/platform.txt: -------------------------------------------------------------------------------- 1 | name=Ariadne Bootloader -------------------------------------------------------------------------------- /hardware/ariadne/avr/variants/bobuino/pins_arduino.h: -------------------------------------------------------------------------------- 1 | #ifndef Pins_Arduino_h 2 | #define Pins_Arduino_h 3 | 4 | #include 5 | 6 | // ATMEL ATMEGA1284P on OSWIN (Bobuino pin layout) 7 | // 8 | // +---\/---+ 9 | // (D 4) PB0 1 | | 40 PA0 (D 21) AI 7 10 | // (D 5) PB1 2 | | 39 PA1 (D 20) AI 6 11 | // INT2 (D 6) PB2 3 | | 38 PA2 (D 19) AI 5 12 | // PWM (D 7) PB3 4 | | 37 PA3 (D 18) AI 4 13 | // PWM/SS (D 10) PB4 5 | | 36 PA4 (D 17) AI 3 14 | // MOSI (D 11) PB5 6 | | 35 PA5 (D 16) AI 2 15 | // PWM/MISO (D 12) PB6 7 | | 34 PA6 (D 15) AI 1 16 | // PWM/SCK (D 13) PB7 8 | | 33 PA7 (D 14) AI 0 17 | // RST 9 | | 32 AREF 18 | // VCC 10 | | 31 GND 19 | // GND 11 | | 30 AVCC 20 | // XTAL2 12 | | 29 PC7 (D 29) 21 | // XTAL1 13 | | 28 PC6 (D 28) 22 | // RX0 (D 0) PD0 14 | | 27 PC5 (D 27) TDI 23 | // TX0 (D 1) PD1 15 | | 26 PC4 (D 26) TDO 24 | // INT0 RX1 (D 2) PD2 16 | | 25 PC3 (D 25) TMS 25 | // INT1 TX1 (D 3) PD3 17 | | 24 PC2 (D 24) TCK 26 | // PWM (D 30) PD4 18 | | 23 PC1 (D 23) SDA 27 | // PWM (D 8) PD5 19 | | 22 PC0 (D 22) SCL 28 | // PWM (D 9) PD6 20 | | 21 PD7 (D 31) PWM 29 | // +--------+ 30 | // 31 | 32 | #define NUM_DIGITAL_PINS 32 33 | #define NUM_ANALOG_INPUTS 8 34 | #define analogInputToDigitalPin(p) ((p < NUM_ANALOG_INPUTS) ? 21 - (p) : -1) 35 | 36 | extern const uint8_t digital_pin_to_pcint[NUM_DIGITAL_PINS]; 37 | extern const uint16_t __pcmsk[]; 38 | //extern const uint8_t digital_pin_to_timer_PGM[NUM_DIGITAL_PINS]; 39 | 40 | #define ifpin(p,what,ifnot) (((p) >= 0 && (p) < NUM_DIGITAL_PINS) ? (what) : (ifnot)) 41 | #define digitalPinHasPWM(p) ifpin(p,pgm_read_byte(digital_pin_to_timer_PGM + (p)) != NOT_ON_TIMER,1==0) 42 | 43 | #define digitalPinToAnalogPin(p) ( (p) >= 14 && (p) <= 21 ? (p) - 14 : -1 ) 44 | //#define analogPinToChannel(p) ( (p) < NUM_ANALOG_INPUTS ? NUM_ANALOG_INPUTS - (p) : -1 ) 45 | #define analogPinToChannel(p) ( (p) < NUM_ANALOG_INPUTS ? (NUM_ANALOG_INPUTS-1) - (p) : -1 ) // Correct analogue pin numbering 46 | 47 | static const uint8_t SS = 10; 48 | static const uint8_t MOSI = 11; 49 | static const uint8_t MISO = 12; 50 | static const uint8_t SCK = 13; 51 | 52 | static const uint8_t SDA = 23; 53 | static const uint8_t SCL = 22; 54 | static const uint8_t LED_BUILTIN = 13; 55 | 56 | static const uint8_t A0 = 14; 57 | static const uint8_t A1 = 15; 58 | static const uint8_t A2 = 16; 59 | static const uint8_t A3 = 17; 60 | static const uint8_t A4 = 18; 61 | static const uint8_t A5 = 19; 62 | static const uint8_t A6 = 20; 63 | static const uint8_t A7 = 21; 64 | 65 | #define digitalPinToPCICR(p) ifpin(p,&PCICR,(uint8_t *)0) 66 | #define digitalPinToPCICRbit(p) ifpin(p,digital_pin_to_pcint[p] >> 3,(uint8_t *)0) 67 | #define digitalPinToPCMSK(p) ifpin(p,__pcmsk[digital_pin_to_pcint[]],(uint8_t *)0) 68 | #define digitalPinToPCMSKbit(p) ifpin(p,digital_pin_to_pcint[p] & 0x7,(uint8_t *)0) 69 | 70 | #ifdef ARDUINO_MAIN 71 | 72 | #define PA 1 73 | #define PB 2 74 | #define PC 3 75 | #define PD 4 76 | 77 | const uint8_t digital_pin_to_pcint[NUM_DIGITAL_PINS] = 78 | { 79 | 24, // D0 PD0 80 | 25, // D1 PD1 81 | 26, // D2 PD2 82 | 27, // D3 PD3 83 | 8, // D4 PB0 84 | 9, // D5 PB1 85 | 10, // D6 PB2 86 | 11, // D7 PB3 87 | 29, // D8 PD5 88 | 30, // D9 PD6 89 | 12, // D10 PB4 90 | 13, // D11 PB5 91 | 14, // D12 PB6 92 | 15, // D13 PB7 93 | 7, // D14 PA7 94 | 6, // D15 PA6 95 | 5, // D16 PA5 96 | 4, // D17 PA4 97 | 3, // D18 PA3 98 | 2, // D19 PA2 99 | 1, // D20 PA1 100 | 0, // D21 PA0 101 | 16, // D22 PC0 102 | 17, // D23 PC1 103 | 18, // D24 PC2 104 | 19, // D25 PC3 105 | 20, // D26 PC4 106 | 21, // D27 PC5 107 | 22, // D28 PC6 108 | 23, // D29 PC7 109 | 28, // D30 PD4 110 | 31, // D31 PD7 111 | }; 112 | 113 | const uint16_t __pcmsk[] = 114 | { 115 | (uint16_t)&PCMSK0, 116 | (uint16_t)&PCMSK1, 117 | (uint16_t)&PCMSK2, 118 | (uint16_t)&PCMSK3 119 | }; 120 | 121 | // these arrays map port names (e.g. port B) to the 122 | // appropriate addresses for various functions (e.g. reading 123 | // and writing) 124 | const uint16_t PROGMEM port_to_mode_PGM[] = 125 | { 126 | NOT_A_PORT, 127 | (uint16_t) &DDRA, 128 | (uint16_t) &DDRB, 129 | (uint16_t) &DDRC, 130 | (uint16_t) &DDRD, 131 | }; 132 | 133 | const uint16_t PROGMEM port_to_output_PGM[] = 134 | { 135 | NOT_A_PORT, 136 | (uint16_t) &PORTA, 137 | (uint16_t) &PORTB, 138 | (uint16_t) &PORTC, 139 | (uint16_t) &PORTD, 140 | }; 141 | 142 | const uint16_t PROGMEM port_to_input_PGM[] = 143 | { 144 | NOT_A_PORT, 145 | (uint16_t) &PINA, 146 | (uint16_t) &PINB, 147 | (uint16_t) &PINC, 148 | (uint16_t) &PIND, 149 | }; 150 | 151 | const uint8_t PROGMEM digital_pin_to_port_PGM[NUM_DIGITAL_PINS] = 152 | { 153 | PD, // D0 154 | PD, // D1 155 | PD, // D2 156 | PD, // D3 157 | PB, // D4 158 | PB, // D5 159 | PB, // D6 160 | PB, // D7 161 | PD, // D8 162 | PD, // D9 163 | PB, // D10 164 | PB, // D11 165 | PB, // D12 166 | PB, // D13 167 | PA, // D14 168 | PA, // D15 169 | PA, // D16 170 | PA, // D17 171 | PA, // D18 172 | PA, // D19 173 | PA, // D20 174 | PA, // D21 175 | PC, // D22 176 | PC, // D23 177 | PC, // D24 178 | PC, // D25 179 | PC, // D26 180 | PC, // D27 181 | PC, // D28 182 | PC, // D29 183 | PD, // D30 184 | PD, // D31 185 | }; 186 | 187 | const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[NUM_DIGITAL_PINS] = 188 | { 189 | _BV(0), // D0 PD0 190 | _BV(1), // D1 PD1 191 | _BV(2), // D2 PD2 192 | _BV(3), // D3 PD3 193 | _BV(0), // D4 PB0 194 | _BV(1), // D5 PB1 195 | _BV(2), // D6 PB2 196 | _BV(3), // D7 PB3 197 | _BV(5), // D8 PD5 198 | _BV(6), // D9 PD6 199 | _BV(4), // D10 PB4 200 | _BV(5), // D11 PB5 201 | _BV(6), // D12 PB6 202 | _BV(7), // D13 PB7 203 | _BV(7), // D14 PA7 204 | _BV(6), // D15 PA6 205 | _BV(5), // D16 PA5 206 | _BV(4), // D17 PA4 207 | _BV(3), // D18 PA3 208 | _BV(2), // D19 PA2 209 | _BV(1), // D20 PA1 210 | _BV(0), // D21 PA0 211 | _BV(0), // D22 PC0 212 | _BV(1), // D23 PC1 213 | _BV(2), // D24 PC2 214 | _BV(3), // D25 PC3 215 | _BV(4), // D26 PC4 216 | _BV(5), // D27 PC5 217 | _BV(6), // D28 PC6 218 | _BV(7), // D29 PC7 219 | _BV(4), // D30 PD4 220 | _BV(7), // D31 PD7 221 | }; 222 | 223 | const uint8_t PROGMEM digital_pin_to_timer_PGM[NUM_DIGITAL_PINS] = 224 | { 225 | NOT_ON_TIMER, // D0 PD0 226 | NOT_ON_TIMER, // D1 PD1 227 | NOT_ON_TIMER, // D2 PD2 228 | NOT_ON_TIMER, // D3 PD3 229 | NOT_ON_TIMER, // D4 PB0 230 | NOT_ON_TIMER, // D5 PB1 231 | NOT_ON_TIMER, // D6 PB2 232 | TIMER0A, // D7 PB3 233 | TIMER1A, // D8 PD5 234 | TIMER2B, // D9 PD6 235 | TIMER0B, // D10 PB4 236 | NOT_ON_TIMER, // D11 PB5 237 | TIMER3A, // D12 PB6 238 | TIMER3B, // D13 PB7 239 | NOT_ON_TIMER, // D14 PA0 240 | NOT_ON_TIMER, // D15 PA1 241 | NOT_ON_TIMER, // D16 PA2 242 | NOT_ON_TIMER, // D17 PA3 243 | NOT_ON_TIMER, // D18 PA4 244 | NOT_ON_TIMER, // D19 PA5 245 | NOT_ON_TIMER, // D20 PA6 246 | NOT_ON_TIMER, // D21 PA7 247 | NOT_ON_TIMER, // D22 PC0 248 | NOT_ON_TIMER, // D23 PC1 249 | NOT_ON_TIMER, // D24 PC2 250 | NOT_ON_TIMER, // D25 PC3 251 | NOT_ON_TIMER, // D26 PC4 252 | NOT_ON_TIMER, // D27 PC5 253 | NOT_ON_TIMER, // D28 PC6 254 | NOT_ON_TIMER, // D29 PC7 255 | TIMER1B, // D30 PD4 256 | TIMER2A, // D31 PD7 257 | }; 258 | 259 | #endif // ARDUINO_MAIN 260 | 261 | #endif // Pins_Arduino_h 262 | // vim:ai:cin:sts=2 sw=2 ft=cpp 263 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/NOTES: -------------------------------------------------------------------------------- 1 | __THIS FILE IS A COMPILATION OF NOTES THAT MIGHT PROVE USEFUL IN THE FUTURE__ 2 | 3 | * NOTE: CHECK VALIDATIONS IN TFTP AGAIN!!!!!!!!!! YOU FUCKING MORON! 4 | 5 | * NOTE: We could support instant booting if there was a watchdog reset by checking for that. That way reset is instant but reprogram waits. 6 | 7 | * NOTE: stk500v2 bootloader only needs avrinterruptname.h and avr_cpunames.h if you want to build the monitor 8 | 9 | * NOTE: stk500v2 defines the mcu signature bytes with a comment about that at line ~280. But the are defined also in the includes from . Look into it. 10 | 11 | * NOTE: The tablejump instructions use the LPM assembler instruction for access to jump tables. Always use -fno-jump-tables switch, if compiling a bootloader for devices with more than 64 KB of code memory. 12 | (http://www.nongnu.org/avr-libc/user-manual/using_tools.html) 13 | 14 | 15 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/README.md: -------------------------------------------------------------------------------- 1 | THIS IS THE OLD README. IT REMAINS AS IT MAY HAVE SOME MORE INFORMATION. OUTDATED 2 | ================================================================================= 3 | 4 | Ethernet Bootloader for the ATmega328P / W5100 5 | ============================================== 6 | 7 | Flashing bootloader: 8 | -------------------- 9 | During development an [ArduinoISP](http://arduino.cc/en/Tutorial/ArduinoISP "ArduinoISP") 10 | was used to burn the bootloader on the board and that is what is supported in 11 | the default Makefile. If you have another ISP and since you are here it is safe 12 | assume that you know how to edit the Makefile to support your ISP. After 13 | connecting your ISP all you need to do is "make install" in the firmware 14 | directory. 15 | 16 | The size of the bootloader is currently 2375 bytes without any debug messages. 17 | With full debugging enabled it is well over 4k so you can't enable all messages 18 | at the same time. 19 | 20 | 21 | Configuring your network: 22 | ------------------------- 23 | The bootloader's' default address is 192.168.1.250. Configure your computer 24 | network card to a static address of 192.168.1.1 with a subnet of 255.255.255.0. 25 | By default, the bootloader assumes an internet gateway is at address 26 | 192.168.1.1. The default network settings can be changed at the top of the 27 | "net.h" file. 28 | 29 | The bootloader listens to port 69 for incoming connections and switches to 30 | port 46969 for the transfers. So if you need to flash remotely, outside your 31 | local network you should forward these 2 ports in your router to the Arduino. 32 | 33 | 34 | Converting "sketches" to the right format: 35 | ---------------------------------------- 36 | The bootloader accepts raw binary images, starting at address 0x0000. 37 | These can be generated using avr-objcopy, part of WinAVR / AVR-GCC, using the 38 | "-O binary" option. 39 | Example: avr-objcopy -j .text -j .data -O binary [app].elf [app].bin 40 | 41 | There is also a modified version of the arscons SConstruct script for the scons 42 | build system that will automatically build the ino sketch and generate the 43 | needed binary. To use the script create a folder with the same (case sensitive) 44 | name of your [app].ino file and put the SConstruct and the [app].ino files in that 45 | folder. After that, navigate to the folder using a terminal and run the "scons" 46 | command. 47 | 48 | 49 | Uploading firmware manually: 50 | ---------------------------- 51 | 1. Check the target board is powered, and connected to the computer ethernet. 52 | 2. Verify the computer network settings: Static IP of 192.168.1.1, Subnet of 255.255.255.0. 53 | 3. In a console window: tftp 192.168.1.250 54 | 4. At the tftp> prompt: Make sure the tftp client is in octet mode using the 55 | mode octet" command. Here you can also put the "trace" and "verbose" commands 56 | for some more output. 57 | 5. Push reset button to start the bootloader. The LED will blink rapidly. 58 | 6. While the LED blinks, "put [app].bin" (where app.bin is your application binary image) 59 | 7. The board will be reprogrammed. Type quit to exit tftp. 60 | 61 | 62 | Flash codes: 63 | ------------ 64 | * Rapid blinking: Ethernet bootloader is running. 65 | * Slow fading: Test application is running. 66 | 67 | The bootloader waits for 5 seconds to be flashed. If the board is programmed 68 | after the 5 seconds the bootloader will timeout and start the user application. 69 | Otherwise it will restart the 5 second timeout. 70 | 71 | 72 | Debugging: 73 | ---------- 74 | By default the debug interface is disabled. To enable it uncomment the "_DEBUG" 75 | defines in debug.h for the subsystem you want. For any of them to work the plain 76 | "_DEBUG" should be enabled. After flashing the bootloader, helpful messages 77 | will be outputted to the serial port of the Arduino board at 115200 bps speed. 78 | If debugging is enabled the binary image validations are disabled because the 79 | the test applications do not conform with the validation statements. 80 | 81 | 82 | Version history 83 | --------------- 84 | * 0.1: First internal release by the Arduino project. Supports uploads on tftp. 85 | * 0.2: Tftp upload fixed and working. More debugging support 86 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/announce.c: -------------------------------------------------------------------------------- 1 | /* Name: announce.c 2 | * Author: . 3 | * Copyright: Arduino 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: eboot 6 | * Function: announcement (Network broadcast) 7 | * Version: 0.1 tftp / flashing functional 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | #include "announce.h" 14 | #include "spi.h" 15 | #include "w5100.h" 16 | #include "debug.h" 17 | #include "debug_ann.h" 18 | 19 | #if defined(ANNOUNCE) 20 | uint16_t readPointer; 21 | char* hex = "0123456789ABCDEF"; 22 | const char bootloaderIdentString[] PROGMEM = "Ethernet 1.0"; 23 | 24 | 25 | uint8_t readNextByte() 26 | { 27 | uint8_t returnValue; 28 | returnValue = readPointer++; 29 | if(readPointer == S2_RX_END) readPointer = S2_RX_START; 30 | return (returnValue); 31 | } 32 | 33 | void announceReply() 34 | { 35 | uint8_t txBuffer[100]; 36 | uint8_t* txPtr; 37 | uint8_t packetLength = 0; 38 | uint16_t writePointer; 39 | uint8_t value; 40 | uint8_t i; 41 | 42 | writePointer = spiReadWord(REG_S2_TX_WR0, S2_R_CB) + S2_TX_START; 43 | txPtr = txBuffer + 2; 44 | 45 | // Send IP address in hex 46 | // 47 | for(i = REG_SIPR0; i <= REG_SIPR3; i++) { 48 | value = spiReadReg(i, S2_R_CB); 49 | *txPtr++ = hex[value >> 4]; 50 | *txPtr++ = hex[value & 0xf]; 51 | } 52 | // 53 | // Tag on ident string 54 | // 55 | memcpy_P(txPtr, bootloaderIdentString, bootloaderIdentStringLength); 56 | packetLength = 8 + bootloaderIdentStringLength; 57 | 58 | // Write packet length at start of packet 59 | txBuffer[0] = 0; 60 | txBuffer[1] = packetLength; 61 | packetLength += 2; 62 | txPtr = txBuffer; 63 | while(packetLength--) { 64 | spiWriteReg(writePointer++, S2_W_CB, *txPtr++); 65 | if(writePointer == S2_TX_END) writePointer = S2_TX_START; 66 | } 67 | spiWriteWord(REG_S2_TX_WR0, S2_W_CB, writePointer - S2_TX_START); 68 | spiWriteReg(REG_S2_CR, S2_W_CB, CR_SEND); 69 | while(spiReadReg(REG_S2_CR, S2_R_CB)); 70 | } 71 | 72 | //FIXME: void announcePacket(uint16_t packetSize) { 73 | void announcePacket() 74 | { 75 | uint8_t buffer[ANNOUNCE_DATA_SIZE]; 76 | uint16_t packetLength; 77 | 78 | // Transfer entire packet to RAM 79 | uint8_t* bufPtr = buffer; 80 | uint16_t count; 81 | 82 | readPointer = spiReadWord(REG_S2_RX_RD0, S2_R_CB) + S2_RX_START; 83 | 84 | // Read destination IP address 85 | for(count = 0; count < 4; count++) { 86 | spiWriteReg(REG_S2_DIPR0 + count, S2_W_CB, readNextByte()); 87 | } 88 | 89 | // Read destination port - but ignore it and respond on 5555 anyway. 90 | readNextByte(); 91 | readNextByte(); 92 | spiWriteWord(REG_S2_DPORT0, S2_W_CB, ANNOUNCE_PORT); 93 | 94 | // Read packet length 95 | packetLength = readNextByte() | (readNextByte() << 8); 96 | 97 | // Trim overlong packets 98 | if(packetLength > ANNOUNCE_DATA_SIZE) packetLength = ANNOUNCE_DATA_SIZE; 99 | for(count = packetLength; --count;) { 100 | *bufPtr++ = readNextByte(); 101 | } 102 | spiWriteWord(REG_S2_RX_RD0, S2_W_CB, readPointer - S2_RX_START); // Write back new pointer 103 | spiWriteWord(REG_S2_CR, S2_W_CB, CR_RECV); // Receive again 104 | 105 | // Dump packet 106 | bufPtr = buffer; 107 | 108 | // Parse packet 109 | if(memcmp(buffer, "arduino", 7) == 0) announceReply(); 110 | } 111 | 112 | void announceInit() 113 | { 114 | // Open socket 115 | do { 116 | spiWriteWord(REG_S2_PORT0, S2_W_CB, ANNOUNCE_PORT); 117 | spiWriteReg(REG_S2_MR, S2_W_CB, MR_UDP); 118 | spiWriteReg(REG_S2_CR, S2_W_CB, CR_OPEN); 119 | if(spiReadReg(REG_S2_SR, S2_R_CB) != SOCK_UDP) 120 | spiWriteReg(REG_S2_CR, S2_W_CB, CR_CLOSE); 121 | } while(spiReadReg(REG_S2_SR, S2_R_CB) != SOCK_UDP); 122 | 123 | 124 | DBG_ANN(tracePGMlnAnn(mDebugAnn_DONE);) 125 | 126 | } 127 | 128 | void announcePoll() 129 | { 130 | uint16_t packetSize = spiReadWord(REG_S2_RX_RSR0, S2_R_CB); 131 | 132 | if(packetSize) { 133 | announcePacket(packetSize); 134 | // Close the socket 135 | spiWriteReg(REG_S2_CR, S2_W_CB, CR_CLOSE); 136 | announceInit(); 137 | } 138 | } 139 | 140 | #endif 141 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/announce.h: -------------------------------------------------------------------------------- 1 | #ifndef announce_h 2 | #define announce_h 3 | 4 | #define ANNOUNCE_PORT (5555) 5 | #define ANNOUNCE_DATA_SIZE 128 6 | #define bootloaderIdentStringLength (12) 7 | 8 | #if defined(ANNOUNCE) 9 | void announceInit(); 10 | void announcePoll(); 11 | #endif 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/ariadne_atmega1284_w5100.hex: -------------------------------------------------------------------------------- 1 | :020000021000EC 2 | :10E0000055C0000004C3000002C3000000C30000AC 3 | :10E01000FEC20000FCC20000FAC20000F8C200000C 4 | :10E02000F6C20000F4C20000F2C20000F0C200001C 5 | :10E03000EEC20000ECC20000EAC20000E8C200002C 6 | :10E04000E6C20000E4C20000E2C20000E0C200003C 7 | :10E05000DEC20000DCC20000DAC20000D8C200004C 8 | :10E06000D6C20000D4C20000D2C20000D0C200005C 9 | :10E07000CEC20000CCC20000CAC20000C8C200006C 10 | :10E08000C6C20000C4C20000C2C2000000050003F6 11 | :10E0900046756C6C00000500044F70636F64653F4B 12 | :10E0A00000000500004572726F72000011241FBE4F 13 | :10E0B000CFEFD0E4DEBFCDBF11E0A0E0B1E0E2EFF2 14 | :10E0C000FAEE01E00BBF02C007900D92AC31B10730 15 | :10E0D000D9F721E0ACE1B1E001C01D92AB32B2074B 16 | :10E0E000E1F701D004C5CDB7DEB7C750D140DEBFE0 17 | :10E0F000CDBF14BE0FB6F894A895809160008861DA 18 | :10E1000080936000109260000FBE99E288E10FB624 19 | :10E11000F894A895809360000FBE909360002FEF55 20 | :10E1200033EC49E0215030404040E1F700C00000AE 21 | :10E13000112484E08093810080E090E0C2D48823A1 22 | :10E1400021F060E080E090E0C4D481E090E0B9D4B8 23 | :10E15000843021F064E081E090E0BBD482E08093E1 24 | :10E16000C00088E18093C10086E08093C20080E116 25 | :10E170008093C40080EF85B980EB84B9479A3F9AB9 26 | :10E1800081E08DBD83E090E09CD4853539F050E08E 27 | :10E19000E52E51E0F52E00E010E016C084E090E09E 28 | :10E1A00090D48A3AA1F741E0E42E41E0F42E05E054 29 | :10E1B00010E0C80186D4F70181937F010F5F1F4FE4 30 | :10E1C00007311105B1F7E3CFF70141917F0160E01D 31 | :10E1D000C80180D20F5F1F4F0C311105A9F7E2D2A1 32 | :10E1E000109222011092210181EA90EE4C01A12CA3 33 | :10E1F000B12CFFEFAF1ABF0A8CE890EE2C01612C16 34 | :10E20000712C2FEF621A720A85E990EEA0E0B0E05F 35 | :10E210009C01AD014F5F5F4FCD5FDE4F2883398397 36 | :10E220004A835B83C350D140AE014F5F5E4FCF5FE7 37 | :10E23000DE4F59834883C150D14080912201811122 38 | :10E240009BC068E686E297E02DD2892B09F494C042 39 | :10E2500081E08093210168E682E097E009D282FFA5 40 | :10E260000FC044E06CE682E097E034D25FEF87E8CD 41 | :10E2700093E1515080409040E1F700C00000EBCFA7 42 | :10E28000B4D2182F60E084E297E00CD2985A7C0157 43 | :10E29000123061F118F4113089F004C01330E9F044 44 | :10E2A000143099F12AE030E0B501A401CE010196C5 45 | :10E2B000FED30AE0FE0131961F0144C02CE030E09D 46 | :10E2C000CD5FDE4F488159816A817B81C350D14047 47 | :10E2D000CE010196ECD30CE0EDCF29E030E0B301A4 48 | :10E2E000A201CE010196E3D309E0E4CF809123019E 49 | :10E2F000909124012091250130912601281739079A 50 | :10E3000020F49093260180932501198284E08A836A 51 | :10E3100080912301909124019B838C8304E0CACFD8 52 | :10E32000F10141911F016701FFEFCF1ADF0A64E796 53 | :10E33000C701D0D1C11420E6D20619F4C12C38E5AA 54 | :10E34000D32E7601015060F7B701785584E297E04B 55 | :10E35000DAD140E26CE681E097E0BCD168E681E08A 56 | :10E3600097E086D18111FACF143031F440E16CE6A8 57 | :10E3700081E097E0AFD136C1809121018111EAC0DF 58 | :10E380008091C00087FFE6C043D181E080932201E5 59 | :10E3900049D18134B9F446D1C95FDE4F8883C75073 60 | :10E3A000D14053D1C95FDE4F8881C750D1408238F8 61 | :10E3B00011F484E003C0813819F480E03FD1C8C073 62 | :10E3C00083E0FCCF823411F484E103C0853419F476 63 | :10E3D00084E047D1BDC08535A1F424D1182F22D1C6 64 | :10E3E000212F30E0A901582BCA01292F221F2227F3 65 | :10E3F000221F2BBF880F991F90931E0180931D0130 66 | :10E40000A6C0863519F484E02CD1D7CF843609F024 67 | :10E410006EC008D107D180931C0104D1E0901D018A 68 | :10E42000F0901E01E11450EEF50650F4C701A0E093 69 | :10E43000B0E023E0FC01A0935B0020935700E89537 70 | :10E440008E010F5F1F4FEED0F80181938F018091F5 71 | :10E450001C01815080931C018111F5CFE114F0EE75 72 | :10E46000FF0650F0C701A0E0B0E023E0FC01A0935C 73 | :10E470005B0020935700E895E8D007B600FCFDCF7D 74 | :10E480008981DE01119697012A1B3B0B11E0AD013A 75 | :10E49000420F531F129660E070E0FD013197E0815A 76 | :10E4A00090E09E2B0C01FA0160935B0010935700E3 77 | :10E4B000E8951124CF5FDE4F48815981C150D1408A 78 | :10E4C000A417B50711F08C91E2CFC701A0E0B0E02E 79 | :10E4D00025E0FC01A0935B0020935700E89507B668 80 | :10E4E00000FCFDCF81E180935700E89531C084376F 81 | :10E4F000D9F498D097D080931C0194D0A6D00091E5 82 | :10E500001D0110911E01F801869198D00F5F1F4FD9 83 | :10E5100010931E0100931D0180911C018150809376 84 | :10E520001C018111ECCF14C0853739F48ED08EE1F7 85 | :10E5300085D087E983D085E041CF813541F485D00E 86 | :10E540006EEE82E090E0C5D280E178D04BC07DD005 87 | :10E5500080E174D080E090E0DC01ABBFFC018791EA 88 | :10E5600096910196E9F08091290190912A010A97EC 89 | :10E57000B8F082E090E0A5D28E3EA1F18091210119 90 | :10E58000813071F440E050E0BA0183E0FA01609319 91 | :10E590005B0080935700E89505D13AD01092210195 92 | :10E5A000A895809184009091850094FF04C02BB1C0 93 | :10E5B00020582BB901C05F9820911F013091200194 94 | :10E5C0008217930750F42091290130912A012F5F7F 95 | :10E5D0003F4F30932A01209329019093200180938B 96 | :10E5E0001F012BCE0FB6F894A8958091600088612A 97 | :10E5F00080936000109260000FBEEE27FF27099401 98 | :10E6000080E090E0C95FDE4FDEBFCDBF0895F8CC5B 99 | :10E61000109285001092840010922A011092290114 100 | :10E62000A89508958091C00087FFFCCF8091C0001D 101 | :10E6300084FD01C0A8958091C60008959091C00006 102 | :10E6400095FFFCCF8093C6000895ECDF803239F04F 103 | :10E6500088E18093600088E080936000FFCF84E1D0 104 | :10E66000EDCFCF93C82FDEDFC150E9F7CF91EDCFCB 105 | :10E6700020E52CBD2C982FE02EBD0DB407FEFDCF5C 106 | :10E68000292F33272EBD0DB407FEFDCF8EBD0DB44F 107 | :10E6900007FEFDCF1EBC0DB407FEFDCF2C9A8EB534 108 | :10E6A0001CBC08950F931F93CF93DF938C01D62F3B 109 | :10E6B000DFDFC82F6D2FC8010196DADF2C2F30E085 110 | :10E6C000322F2227A901482BCA01DF91CF911F9138 111 | :10E6D0000F91089520E52CBD2C9820EF2EBD0DB490 112 | :10E6E00007FEFDCF292F33272EBD0DB407FEFDCF2A 113 | :10E6F0008EBD0DB407FEFDCF4EBD0DB407FEFDCFA0 114 | :10E700002C9A1CBC08950F931F93CF93DF93EC01B9 115 | :10E710008B01472F55276CE6CE01DCDF402F6CE6DE 116 | :10E72000CE010196DF91CF911F910F91D3CFCF935F 117 | :10E73000DF93EC0140E16CE681E097E0CBDF68E637 118 | :10E7400081E097E095DF8111FACF4FEF6CE682E030 119 | :10E7500097E0C0DF42E06CE680E097E0BBDFBE01FF 120 | :10E7600084E097E0D0DF41E06CE681E097E0B2DF43 121 | :10E7700068E681E097E07CDF8111FACF68E683E00C 122 | :10E7800097E076DF823229F040E16CE681E097E0A5 123 | :10E79000A1DF68E683E097E06BDF8232B1F6DF91BC 124 | :10E7A000CF910895CF9385E490E0C1DF87E190E0B9 125 | :10E7B00088D18B3B91F489E190E083D1C82F88E127 126 | :10E7C00090E07FD12C2F30E0322F2227280F311DEF 127 | :10E7D000309328012093270106C089E797EB909397 128 | :10E7E000280180932701CF9108952F923F924F9255 129 | :10E7F0005F926F927F928F929F92AF92BF92CF92D1 130 | :10E80000DF92EF92FF920F931F93CF93DF93CDB7D9 131 | :10E81000DEB7CC50D240DEBFCDBF68E688E297E0DD 132 | :10E8200041DF009711F480E098E79E012F5F3F4F92 133 | :10E8300079015E0133EFA31A3DEFB30A8701A016F9 134 | :10E84000B10691F06C014FEFC41AD40A60E010DFFA 135 | :10E85000F80181938F01C114F0E8DF0619F4C12C8F 136 | :10E8600088E7D82EC601EBCFBC0188E297E04BDFEA 137 | :10E8700040E46CE681E097E02DDF68E681E097E018 138 | :10E88000F7DE8111FACF0CE017E0F70141917F012B 139 | :10E890006CE6C8011FDF0F5F1F4F0231F7E01F0753 140 | :10E8A000A1F72F8130E0322F222788857901E80EE9 141 | :10E8B000F11C898590E0982F88272A85820F911D69 142 | :10E8C0000B8510E0102F00272C85020F111D8330BF 143 | :10E8D000910579F4093F1105A8F5809125019091E2 144 | :10E8E00026010817190770F101968017910750F15A 145 | :10E8F00024C025E0E21622E0F20620F584309105DE 146 | :10E90000CCF48130910529F10297E1F481DE6FEFBB 147 | :10E9100082E090E0DED0809127019091280107DF0E 148 | :10E9200010922601109225011092240110922301C9 149 | :10E9300012E0A5C006976CF005C025E0E21622E0C3 150 | :10E94000F20648F08091270190912801F0DE11E055 151 | :10E9500096C010E094C05CDE9701245031091093FA 152 | :10E9600024010093230101501109C801880F892F48 153 | :10E97000881F990B9195A0E0B0E0BC015527442772 154 | :10E98000C801A0E0B0E0E9E0880F991FAA1FBB1FF3 155 | :10E99000EA95D1F7AA27BB27842B952BA62BB72B5B 156 | :10E9A000AC01BD01420F531F611D711D4130504F1D 157 | :10E9B0006140710508F062C02115F2E03F0710F4D4 158 | :10E9C00014E001C012E0222319F02F5F3F4FFBCF6C 159 | :10E9D0007E014EE0E40EF11C40E050E001E04C010D 160 | :10E9E0005D0161E0961AA108B10863E0D62E75E0DA 161 | :10E9F000C72EE1E13E2E4217530708F038C02C0124 162 | :10EA00003D01440E551E611C711CF7013197608158 163 | :10EA1000F701208070E072290B01F20160925B0027 164 | :10EA200000935700E89511244E5F5F4F41111BC0C2 165 | :10EA300024013501440E551E611C711CF2016092C7 166 | :10EA40005B00D0925700E89507B600FCFDCFF201BD 167 | :10EA500060925B00C0925700E89507B600FCFDCFBE 168 | :10EA600030925700E895F2E0EF0EF11CC4CF14305D 169 | :10EA700031F46EEE82E090E02CD001C013E0812FE3 170 | :10EA8000C45FDD4FDEBFCDBFDF91CF911F910F91EE 171 | :10EA9000FF90EF90DF90CF90BF90AF909F908F90BE 172 | :10EAA0007F906F905F904F903F902F9008956BBF35 173 | :10EAB000FA01DC0102C007900D9221503040D8F7D6 174 | :10EAC0000895F999FECF92BD81BDF89A992780B536 175 | :10EAD0000895262FF999FECF1FBA92BD81BD20BDA2 176 | :10EAE0000FB6F894FA9AF99A0FBE01960895F89421 177 | :02EAF000FFCF56 178 | :10EAF20080C0A801FEFFFFFF00DEADBEEFFEEDC04D 179 | :0CEB0200A801800000000007D0805555DD 180 | :040000031000E00009 181 | :00000001FF 182 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/ariadne_atmega328_ethernet.hex: -------------------------------------------------------------------------------- 1 | :1070000043C00000ACC20000AAC20000A8C2000039 2 | :10701000A6C20000A4C20000A2C20000A0C20000DC 3 | :107020009EC200009CC200009AC2000098C20000EC 4 | :1070300096C2000094C2000092C2000090C20000FC 5 | :107040008EC200008CC200008AC2000088C200000C 6 | :1070500086C2000084C2000082C2000080C200001C 7 | :107060007EC200007CC200000005000346756C6C07 8 | :1070700000000500044F70636F64653F0000050069 9 | :10708000004572726F72000011241FBECFEFD8E06E 10 | :10709000DEBFCDBF11E0A0E0B1E0EEEFF9E702C046 11 | :1070A00005900D92AC31B107D9F721E0ACE1B1E028 12 | :1070B00001C01D92AB32B207E1F701D09EC4CDB73B 13 | :1070C000DEB7C150D140DEBFCDBF14BE0FB6F894BD 14 | :1070D000A8958091600088618093600010926000A4 15 | :1070E0000FBE99E288E10FB6F894A89580936000EE 16 | :1070F0000FBE909360002FEF83EC99E02150804009 17 | :107100009040E1F700C00000112484E080938100EA 18 | :1071100080E090E05CD4882321F060E080E090E0A3 19 | :107120005ED481E090E053D4843021F064E081E0CB 20 | :1071300090E055D482E08093C00088E18093C10044 21 | :1071400086E08093C20080E18093C4008CE385B91F 22 | :107150008CE284B95C9A549A299A219A81E08DBD77 23 | :1071600083E090E034D4853539F050E0E52E51E0ED 24 | :10717000F52E00E010E016C084E090E028D48A3AB2 25 | :10718000A1F741E0E42E41E0F42E05E010E0C80153 26 | :107190001ED4F70181937F010F5F1F4F0731110547 27 | :1071A000B1F7E3CFF70141917F0160E0C8013AD226 28 | :1071B0000F5F1F4F0C311105A9F79CD210922201CD 29 | :1071C00010922101DD24D3948E010F5F1F4F4E01D9 30 | :1071D000F1E88F0E911C23E0C22EA12CB12C32E0DD 31 | :1071E000332E8091220181119FC068E686E297E0EC 32 | :1071F00001D2892B09F498C0D092210168E682E07F 33 | :1072000097E0DED182FF0FC044E06CE682E097E0B9 34 | :1072100009D22FEF87E893E1215080409040E1F7B9 35 | :1072200000C00000EBCF89D2282E60E084E297E016 36 | :10723000E1D1985A7C01E2E02E1629F1E21520F006 37 | :10724000F1E02F1681F006C023E02216A1F084E0C1 38 | :10725000281641F14AE050E06DE770E7C801AED36F 39 | :107260002AE0280146C04CE050E061E770E7C80121 40 | :10727000A5D32CE0F6CF49E050E068E670E7C801FE 41 | :107280009DD329E0EECF809123019091240120919C 42 | :107290002501309126012817390720F49093260103 43 | :1072A00080932501198294E09A8380912301909123 44 | :1072B00024019B838C8324E0D4CFF20141912F01E0 45 | :1072C0003701FFEF6F1A7F0A64E7C701CF5FDE4F18 46 | :1072D0002883C150D140A6D1CF5FDE4F2881C15055 47 | :1072E000D140611480E6780619F4612C98E5792E76 48 | :1072F0007301215010F7B701785584E297E0ABD1C4 49 | :1073000040E26CE681E097E08DD168E681E097E0AD 50 | :1073100057D18111FACF94E0291206C040E16CE602 51 | :1073200081E097E07FD106C1809121018111C4C025 52 | :107330008091C00087FFC0C013D1D09222011AD122 53 | :107340008134B9F417D1CF5FDE4F8883C150D1406B 54 | :1073500024D1CF5FDE4F8881C150D140823811F4F3 55 | :1073600084E003C0813819F480E010D1A3C083E029 56 | :10737000FCCF823411F484E103C0853419F484E035 57 | :1073800018D198C0853569F4F5D0F82EF3D02F2D9B 58 | :1073900030E0382B220F331F30931E0120931D0144 59 | :1073A00088C0863519F484E004D1DECF843609F034 60 | :1073B00051C0E0D0DFD080931C01DCD0E0901D01F3 61 | :1073C000F0901E01E114E0E7FE0620F4F701C09200 62 | :1073D0005700E8953801CED0F30181933F018091A9 63 | :1073E0001C01815080931C018111F5CFE114F0E75D 64 | :1073F000FF0620F0F701C0925700E895CED007B6FF 65 | :1074000000FCFDCF8981D8019701201B310BBD0104 66 | :10741000620F731F1296AD0141505109FA0140816C 67 | :1074200090E0942BFB010C01D0925700E8951124B9 68 | :10743000A815B90511F08C91EACF25E0F70120934A 69 | :107440005700E89507B600FCFDCF81E18093570017 70 | :10745000E89530C08437D1F48DD08CD080931C0156 71 | :1074600089D09BD0E0911D01F0911E01CF010196C2 72 | :1074700090931E0180931D01849188D080911C01FE 73 | :10748000815080931C018111EDCF14C0853739F4F0 74 | :1074900084D08EE17BD085E979D08FE066CF8135CD 75 | :1074A00041F47BD06EEE82E090E099D280E16ED024 76 | :1074B00041C073D080E16AD0F50185919491019625 77 | :1074C000B9F08091290190912A010A9788F082E011 78 | :1074D00090E07DD28E3E71F180912101813041F4A6 79 | :1074E000F501C0925700E89505D13AD010922101DC 80 | :1074F000A895809184009091850094FF04C025B1E7 81 | :10750000232525B901C0299820911F013091200120 82 | :107510008217930750F42091290130912A012F5F9F 83 | :107520003F4F30932A0120932901909320018093AB 84 | :107530001F0157CE0FB6F894A8958091600088611E 85 | :1075400080936000109260000FBEEE27FF27099421 86 | :1075500080E090E0CF5FDE4FDEBFCDBF089550CD1D 87 | :10756000109285001092840010922A011092290135 88 | :10757000A89508958091C00087FFFCCF8091C0003E 89 | :1075800084FD01C0A8958091C60008959091C00027 90 | :1075900095FFFCCF8093C6000895ECDF803239F070 91 | :1075A00088E18093600088E080936000FFCF84E1F1 92 | :1075B000EDCFCF93C82FDEDFC150E9F7CF91EDCFEC 93 | :1075C00020E52CBD2A982FE02EBD0DB407FEFDCF7F 94 | :1075D000292F33272EBD0DB407FEFDCF8EBD0DB470 95 | :1075E00007FEFDCF1EBC0DB407FEFDCF2A9A8EB557 96 | :1075F0001CBC08950F931F93CF93DF938C01D62F5C 97 | :10760000DFDFC82F6D2FC8010196DADF2C2F30E0A5 98 | :10761000322F2227A901482BCA01DF91CF911F9158 99 | :107620000F91089520E52CBD2A9820EF2EBD0DB4B2 100 | :1076300007FEFDCF292F33272EBD0DB407FEFDCF4A 101 | :107640008EBD0DB407FEFDCF4EBD0DB407FEFDCFC0 102 | :107650002A9A1CBC08950F931F93CF93DF93EC01DC 103 | :107660008B01472F55276CE6CE01DCDF402F6CE6FF 104 | :10767000CE010196DF91CF911F910F91D3CFCF9380 105 | :10768000DF93EC0140E16CE681E097E0CBDF68E658 106 | :1076900081E097E095DF8111FACF4FEF6CE682E051 107 | :1076A00097E0C0DF42E06CE680E097E0BBDFBE0120 108 | :1076B00084E097E0D0DF41E06CE681E097E0B2DF64 109 | :1076C00068E681E097E07CDF8111FACF68E683E02D 110 | :1076D00097E076DF823229F040E16CE681E097E0C6 111 | :1076E000A1DF68E683E097E06BDF8232B1F6DF91DD 112 | :1076F000CF910895CF9385E490E0C1DF87E190E0DA 113 | :1077000066D18B3B91F489E190E061D1C82F88E18B 114 | :1077100090E05DD12C2F30E0322F2227280F311D31 115 | :10772000309328012093270106C089E797EB9093B7 116 | :10773000280180932701CF910895AF92BF92CF92F5 117 | :10774000DF92EF92FF920F931F93CF93DF93CDB70A 118 | :10775000DEB7CD50D240DEBFCDBF68E688E297E00D 119 | :1077600049DF009711F480E098E79E012F5F3F4FBB 120 | :1077700079015E0133EFA31A3DEFB30A8701A0162A 121 | :10778000B10691F06C014FEFC41AD40A60E018DF23 122 | :10779000F80181938F01C114F0E8DF0619F4C12CC0 123 | :1077A00098E7D92EC601EBCFBC0188E297E053DF02 124 | :1077B00040E46CE681E097E035DF68E681E097E041 125 | :1077C000FFDE8111FACF0CE017E0F70141917F0154 126 | :1077D0006CE6C80127DF0F5F1F4F0231F7E01F077C 127 | :1077E000A1F78F8190E0982F882728857C01E20EF1 128 | :1077F000F11C298530E0322F22278A85280F311D80 129 | :107800000B8510E0102F00278C85080F111D2330E9 130 | :10781000310579F409331105B8F58091250190916E 131 | :1078200026010817190780F101968017910760F16A 132 | :1078300026C045E0E41642E0F40630F52430310578 133 | :10784000D4F42130310539F122303105E9F488DEF4 134 | :107850006FEF82E090E0C3D08091270190912801E2 135 | :107860000EDF109226011092250110922401109231 136 | :10787000230122E093C0263031056CF005C0F5E00D 137 | :10788000EF16F2E0FF0648F0809127019091280161 138 | :10789000F6DE21E083C020E081C062DEC7010497EC 139 | :1078A000109324010093230101501109102F002788 140 | :1078B000110F9C01200F311F2130304708F06BC0A1 141 | :1078C0008115F2E09F0710F424E001C022E0AC0132 142 | :1078D0004F775527452B11F00196F9CF011511056A 143 | :1078E00099F4FE013E96AE014E5B5F4FDF011197AA 144 | :1078F0003C913C3009F051C03081343909F04DC021 145 | :107900003496E417F50791F7DE011E9660E070E00B 146 | :1079100031E043E0F42E55E0E52EE1E1DE2E68177C 147 | :10792000790740F5FD0131974081EC9150E05E2BE5 148 | :10793000F8010A0130935700E89511246E5F7F4FDC 149 | :10794000AB014F775527452B89F4EE57F109F0929B 150 | :107950005700E89507B600FCFDCFE0925700E89588 151 | :1079600007B600FCFDCFD0925700E89512960E5F47 152 | :107970001F4FD5CF243091F46EEE82E090E0C35FCC 153 | :10798000DD4F2883CD50D2402AD0C35FDD4F288100 154 | :10799000CD50D24003C023E001C025E0822FC35F59 155 | :1079A000DD4FDEBFCDBFDF91CF911F910F91FF90D3 156 | :1079B000EF90DF90CF90BF90AF900895FB01DC0176 157 | :1079C00002C005900D9241505040D8F70895F999A2 158 | :1079D000FECF92BD81BDF89A992780B50895262FD4 159 | :1079E000F999FECF1FBA92BD81BD20BD0FB6F894A4 160 | :0E79F000FA9AF99A0FBE01960895F894FFCF07 161 | :1079FE0080C0A801FEFFFFFF00DEADBEEFFEEDC0B2 162 | :0C7A0E00A801800000000007D080555542 163 | :040000030000700089 164 | :00000001FF 165 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/ariadne_atmega328_w5100.hex: -------------------------------------------------------------------------------- 1 | :1070000043C00000AAC20000A8C20000A6C200003F 2 | :10701000A4C20000A2C20000A0C200009EC20000E4 3 | :107020009CC200009AC2000098C2000096C20000F4 4 | :1070300094C2000092C2000090C200008EC2000004 5 | :107040008CC200008AC2000088C2000086C2000014 6 | :1070500084C2000082C2000080C200007EC2000024 7 | :107060007CC200007AC200000005000346756C6C0B 8 | :1070700000000500044F70636F64653F0000050069 9 | :10708000004572726F72000011241FBECFEFD8E06E 10 | :10709000DEBFCDBF11E0A0E0B1E0EAEFF9E702C04A 11 | :1070A00005900D92AC31B107D9F721E0ACE1B1E028 12 | :1070B00001C01D92AB32B207E1F701D09CC4CDB73D 13 | :1070C000DEB7C150D140DEBFCDBF14BE0FB6F894BD 14 | :1070D000A8958091600088618093600010926000A4 15 | :1070E0000FBE99E288E10FB6F894A89580936000EE 16 | :1070F0000FBE909360002FEF83EC99E02150804009 17 | :107100009040E1F700C00000112484E080938100EA 18 | :1071100080E090E05AD4882321F060E080E090E0A5 19 | :107120005CD481E090E051D4843021F064E081E0CF 20 | :1071300090E053D482E08093C00088E18093C10046 21 | :1071400086E08093C20080E18093C4008CE385B91F 22 | :107150008CE284B95C9A549A81E08DBD83E090E022 23 | :1071600034D4853539F050E0E52E51E0F52E00E0BD 24 | :1071700010E016C084E090E028D48A3AA1F741E0FC 25 | :10718000E42E41E0F42E05E010E0C8011ED4F70122 26 | :1071900081937F010F5F1F4F07311105B1F7E3CFD7 27 | :1071A000F70141917F0160E0C8013AD20F5F1F4FA4 28 | :1071B0000C311105A9F79CD21092220110922101E5 29 | :1071C000DD24D3948E010F5F1F4F4E01F1E88F0E27 30 | :1071D000911C21E1322E33E0C32EA12CB12C8091E1 31 | :1071E000220181119FC068E686E297E001D2892BD7 32 | :1071F00009F498C0D092210168E682E097E0DED1E0 33 | :1072000082FF0FC044E06CE682E097E009D22FEFE6 34 | :1072100087E893E1215080409040E1F700C00000F2 35 | :10722000EBCF89D2282E60E084E297E0E1D1985A32 36 | :107230007C01E2E02E1629F1E21520F0F1E02F1694 37 | :1072400081F006C023E02216A1F084E0281641F167 38 | :107250004AE050E06DE770E7C801AED32AE02801AC 39 | :1072600046C04CE050E061E770E7C801A5D32CE0D0 40 | :10727000F6CF49E050E068E670E7C8019DD329E009 41 | :10728000EECF80912301909124012091250130912E 42 | :1072900026012817390720F49093260180932501B1 43 | :1072A000198294E09A8380912301909124019B8319 44 | :1072B0008C8324E0D4CFF20141912F013701FFEFFD 45 | :1072C0006F1A7F0A64E7C701CF5FDE4F2883C15082 46 | :1072D000D140A6D1CF5FDE4F2881C150D14061148B 47 | :1072E00080E6780619F4612C98E5792E7301215017 48 | :1072F00010F7B701785584E297E0ABD140E26CE635 49 | :1073000081E097E08DD168E681E097E057D1811167 50 | :10731000FACF94E0291206C040E16CE681E097E0E4 51 | :107320007FD106C1809121018111C3C08091C0002D 52 | :1073300087FFBFC013D1D09222011AD18134B9F492 53 | :1073400017D1CF5FDE4F8883C150D14024D1CF5FAA 54 | :10735000DE4F8881C150D140823811F484E003C0EF 55 | :10736000813819F480E010D1A2C083E0FCCF8234D0 56 | :1073700011F484E103C0853419F484E018D197C076 57 | :10738000853569F4F5D0F82EF3D02F2D30E0382B69 58 | :10739000220F331F30931E0120931D0187C08635B5 59 | :1073A00019F484E004D1DECF843609F050C0E0D077 60 | :1073B000DFD080931C01DCD0E0901D01F0901E0115 61 | :1073C000E114E0E7FE0620F4F701C0925700E895CB 62 | :1073D0003801CED0F30181933F0180911C0181508F 63 | :1073E00080931C018111F5CFE114F0E7FF0620F036 64 | :1073F000F701C0925700E895CED007B600FCFDCF4C 65 | :107400008981D8019701201B310BBD01620F731FC9 66 | :107410001296AD0141505109FA01408190E0942B40 67 | :10742000FB010C01D0925700E8951124A815B9056D 68 | :1074300011F08C91EACF25E0F70120935700E895F1 69 | :1074400007B600FCFDCF30925700E89530C0843776 70 | :10745000D1F48ED08DD080931C018AD09CD0E09145 71 | :107460001D01F0911E01CF01019690931E018093A2 72 | :107470001D01849189D080911C01815080931C0151 73 | :107480008111EDCF14C0853739F485D08EE17CD0E1 74 | :1074900085E97AD08FE067CF813541F47CD06EEEFC 75 | :1074A00082E090E09AD280E16FD042C074D080E157 76 | :1074B0006BD0F501859194910196B9F080912901E5 77 | :1074C00090912A010A9788F082E090E07ED28E3E69 78 | :1074D00079F180912101813041F4F501C09257008A 79 | :1074E000E89506D13BD010922101A89580918400A7 80 | :1074F0009091850094FF05C035B120E2232725B97E 81 | :1075000001C02D9820911F0130912001821793070F 82 | :1075100050F42091290130912A012F5F3F4F309381 83 | :107520002A01209329019093200180931F0157CEB7 84 | :107530000FB6F894A89580916000886180936000F0 85 | :10754000109260000FBEEE27FF27099480E090E0C4 86 | :10755000CF5FDE4FDEBFCDBF089552CD10928500C4 87 | :107560001092840010922A0110922901A895089582 88 | :107570008091C00087FFFCCF8091C00084FD01C0D6 89 | :10758000A8958091C60008959091C00095FFFCCF0A 90 | :107590008093C6000895ECDF803239F088E1809353 91 | :1075A000600088E080936000FFCF84E1EDCFCF934F 92 | :1075B000C82FDEDFC150E9F7CF91EDCF20E52CBD1C 93 | :1075C0002A982FE02EBD0DB407FEFDCF292F3327BB 94 | :1075D0002EBD0DB407FEFDCF8EBD0DB407FEFDCF51 95 | :1075E0001EBC0DB407FEFDCF2A9A8EB51CBC0895B3 96 | :1075F0000F931F93CF93DF938C01D62FDFDFC82F1C 97 | :107600006D2FC8010196DADF2C2F30E0322F2227B0 98 | :10761000A901482BCA01DF91CF911F910F910895C5 99 | :1076200020E52CBD2A9820EF2EBD0DB407FEFDCF1E 100 | :10763000292F33272EBD0DB407FEFDCF8EBD0DB40F 101 | :1076400007FEFDCF4EBD0DB407FEFDCF2A9A1CBC30 102 | :1076500008950F931F93CF93DF93EC018B01472F76 103 | :1076600055276CE6CE01DCDF402F6CE6CE0101969B 104 | :10767000DF91CF911F910F91D3CFCF93DF93EC0187 105 | :1076800040E16CE681E097E0CBDF68E681E097E0DF 106 | :1076900095DF8111FACF4FEF6CE682E097E0C0DF13 107 | :1076A00042E06CE680E097E0BBDFBE0184E097E05B 108 | :1076B000D0DF41E06CE681E097E0B2DF68E681E090 109 | :1076C00097E07CDF8111FACF68E683E097E076DF10 110 | :1076D000823229F040E16CE681E097E0A1DF68E6C4 111 | :1076E00083E097E06BDF8232B1F6DF91CF910895AE 112 | :1076F000CF9385E490E0C1DF87E190E066D18B3BDA 113 | :1077000091F489E190E061D1C82F88E190E05DD1EA 114 | :107710002C2F30E0322F2227280F311D30932801E3 115 | :107720002093270106C089E797EB90932801809367 116 | :107730002701CF910895AF92BF92CF92DF92EF923F 117 | :10774000FF920F931F93CF93DF93CDB7DEB7CD504A 118 | :10775000D240DEBFCDBF68E688E297E049DF009700 119 | :1077600011F480E098E79E012F5F3F4F79015E01A1 120 | :1077700033EFA31A3DEFB30A8701A016B10691F0CB 121 | :107780006C014FEFC41AD40A60E018DFF80181934E 122 | :107790008F01C114F0E8DF0619F4C12C98E7D92E47 123 | :1077A000C601EBCFBC0188E297E053DF40E46CE612 124 | :1077B00081E097E035DF68E681E097E0FFDE811148 125 | :1077C000FACF0CE017E0F70141917F016CE6C801A8 126 | :1077D00027DF0F5F1F4F0231F7E01F07A1F78F81EF 127 | :1077E00090E0982F882728857C01E20EF11C2985DE 128 | :1077F00030E0322F22278A85280F311D0B8510E0BB 129 | :10780000102F00278C85080F111D2330310579F4C6 130 | :1078100009331105B8F580912501909126010817CB 131 | :10782000190780F101968017910760F126C045E0A5 132 | :10783000E41642E0F40630F524303105D4F421306A 133 | :10784000310539F122303105E9F488DE6FEF82E04D 134 | :1078500090E0C3D080912701909128010EDF109213 135 | :10786000260110922501109224011092230122E09A 136 | :1078700093C0263031056CF005C0F5E0EF16F2E05C 137 | :10788000FF0648F08091270190912801F6DE21E063 138 | :1078900083C020E081C062DEC701049710932401F9 139 | :1078A0000093230101501109102F0027110F9C0193 140 | :1078B000200F311F2130304708F06BC08115F2E0F6 141 | :1078C0009F0710F424E001C022E0AC014F77552758 142 | :1078D000452B11F00196F9CF0115110599F4FE0120 143 | :1078E0003E96AE014E5B5F4FDF0111973C913C30FD 144 | :1078F00009F051C03081343909F04DC03496E41795 145 | :10790000F50791F7DE011E9660E070E031E043E09C 146 | :10791000F42E55E0E52EE1E1DE2E6817790740F5FB 147 | :10792000FD0131974081EC9150E05E2BF8010A0196 148 | :1079300030935700E89511246E5F7F4FAB014F776E 149 | :107940005527452B89F4EE57F109F0925700E89539 150 | :1079500007B600FCFDCFE0925700E89507B600FCA3 151 | :10796000FDCFD0925700E89512960E5F1F4FD5CFEE 152 | :10797000243091F46EEE82E090E0C35FDD4F288307 153 | :10798000CD50D2402AD0C35FDD4F2881CD50D240A8 154 | :1079900003C023E001C025E0822FC35FDD4FDEBFBF 155 | :1079A000CDBFDF91CF911F910F91FF90EF90DF90AE 156 | :1079B000CF90BF90AF900895FB01DC0102C005900D 157 | :1079C0000D9241505040D8F70895F999FECF92BDDD 158 | :1079D00081BDF89A992780B50895262FF999FECF91 159 | :1079E0001FBA92BD81BD20BD0FB6F894FA9AF99ADC 160 | :0A79F0000FBE01960895F894FFCF32 161 | :1079FA0080C0A801FEFFFFFF00DEADBEEFFEEDC0B6 162 | :0C7A0A00A801800000000007D080555546 163 | :040000030000700089 164 | :00000001FF 165 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/ariadne_atmega328_w5200.hex: -------------------------------------------------------------------------------- 1 | :1070000043C00000BAC20000B8C20000B6C200000F 2 | :10701000B4C20000B2C20000B0C20000AEC20000A4 3 | :10702000ACC20000AAC20000A8C20000A6C20000B4 4 | :10703000A4C20000A2C20000A0C200009EC20000C4 5 | :107040009CC200009AC2000098C2000096C20000D4 6 | :1070500094C2000092C2000090C200008EC20000E4 7 | :107060008CC200008AC200000005000346756C6CEB 8 | :1070700000000500044F70636F64653F0000050069 9 | :10708000004572726F72000011241FBECFEFD8E06E 10 | :10709000DEBFCDBF11E0A0E0B1E0ECE2FAE702C054 11 | :1070A00005900D92AC31B107D9F721E0ACE1B1E028 12 | :1070B00001C01D92AB32B207E1F701D0B5C4CDB724 13 | :1070C000DEB7C150D140DEBFCDBF14BE0FB6F894BD 14 | :1070D000A8958091600088618093600010926000A4 15 | :1070E0000FBE99E288E10FB6F894A89580936000EE 16 | :1070F0000FBE909360002FEF83EC99E02150804009 17 | :107100009040E1F700C00000112484E080938100EA 18 | :1071100080E090E073D4882321F060E080E090E08C 19 | :1071200075D481E090E06AD4843021F064E081E09D 20 | :1071300090E06CD482E08093C00088E18093C1002D 21 | :1071400086E08093C20080E18093C4008CE385B91F 22 | :107150008CE284B95C9A549A81E08DBD83E090E022 23 | :107160004DD4853539F050E0E52E51E0F52E00E0A4 24 | :1071700010E016C084E090E041D48A3AA1F741E0E3 25 | :10718000E42E41E0F42E05E010E0C80137D4F70109 26 | :1071900081937F010F5F1F4F07311105B1F7E3CFD7 27 | :1071A000F70141917F0160E0C8014ED20F5F1F4F90 28 | :1071B0000A311105A9F70FE110E442E060E0C801CF 29 | :1071C00043D242E060E0C80101973ED213950F31EF 30 | :1071D000F8E41F0791F7A5D2109222011092210125 31 | :1071E000DD24D3948E010F5F1F4F4E0121E8820EE4 32 | :1071F000911C21E1322E33E0C32EA12CB12C8091C1 33 | :10720000220181119FC068E686E293E405D2892BB2 34 | :1072100009F498C0D092210168E682E093E4DED1BF 35 | :1072200082FF0FC044E06CE682E093E40DD28FEF62 36 | :1072300097E8E3E181509040E040E1F700C00000B2 37 | :10724000EBCF92D2282E60E084E293E4E5D1985609 38 | :107250007C01F2E02F1629F1F21520F021E0221630 39 | :1072600081F006C083E02816A1F094E0291641F1D0 40 | :107270004AE050E06DE770E7C801B7D32AE0280183 41 | :1072800046C04CE050E061E770E7C801AED32CE0A7 42 | :10729000F6CF49E050E068E670E7C801A6D329E0E0 43 | :1072A000EECF80912301909124012091250130910E 44 | :1072B00026012817390720F4909326018093250191 45 | :1072C0001982E4E0EA8380912301909124019B8359 46 | :1072D0008C8324E0D4CFF20141912F013701FFEFDD 47 | :1072E0006F1A7F0A64E7C701CF5FDE4F2883C15062 48 | :1072F000D140AAD1CF5FDE4F2881C150D140611467 49 | :1073000080EA780619F4612C98E9792E73012150EE 50 | :1073100010F7B701785984E293E4B4D140E26CE607 51 | :1073200081E093E491D168E681E093E457D1811143 52 | :10733000FACF94E0291206C040E16CE681E093E4C4 53 | :1073400083D106C1809121018111C3C08091C00009 54 | :1073500087FFBFC013D1D09222011AD18134B9F472 55 | :1073600017D1CF5FDE4F8883C150D14024D1CF5F8A 56 | :10737000DE4F8881C150D140823811F484E003C0CF 57 | :10738000813819F480E010D1A2C083E0FCCF8234B0 58 | :1073900011F484E103C0853419F484E018D197C056 59 | :1073A000853569F4F5D0F82EF3D02F2D30E0382B49 60 | :1073B000220F331F30931E0120931D0187C0863595 61 | :1073C00019F484E004D1DECF843609F050C0E0D057 62 | :1073D000DFD080931C01DCD0E0901D01F0901E01F5 63 | :1073E000E114E0E7FE0620F4F701C0925700E895AB 64 | :1073F0003801CED0F30181933F0180911C0181506F 65 | :1074000080931C018111F5CFE114F0E7FF0620F015 66 | :10741000F701C0925700E895CED007B600FCFDCF2B 67 | :107420008981D8019701201B310BBD01620F731FA9 68 | :107430001296AD0141505109FA01408190E0942B20 69 | :10744000FB010C01D0925700E8951124A815B9054D 70 | :1074500011F08C91EACF25E0F70120935700E895D1 71 | :1074600007B600FCFDCF30925700E89530C0843756 72 | :10747000D1F48ED08DD080931C018AD09CD0E09125 73 | :107480001D01F0911E01CF01019690931E01809382 74 | :107490001D01849189D080911C01815080931C0131 75 | :1074A0008111EDCF14C0853739F485D08EE17CD0C1 76 | :1074B00085E97AD08FE067CF813541F47CD06EEEDC 77 | :1074C00082E090E0A3D280E16FD042C074D080E12E 78 | :1074D0006BD0F501859194910196B9F080912901C5 79 | :1074E00090912A010A9788F082E090E087D28E3E40 80 | :1074F00079F180912101813041F4F501C09257006A 81 | :10750000E8950FD13BD010922101A895809184007D 82 | :107510009091850094FF05C035B120E2232725B95D 83 | :1075200001C02D9820911F013091200182179307EF 84 | :1075300050F42091290130912A012F5F3F4F309361 85 | :107540002A01209329019093200180931F0157CE97 86 | :107550000FB6F894A89580916000886180936000D0 87 | :10756000109260000FBEEE27FF27099480E090E0A4 88 | :10757000CF5FDE4FDEBFCDBF089542CD10928500B4 89 | :107580001092840010922A0110922901A895089562 90 | :107590008091C00087FFFCCF8091C00084FD01C0B6 91 | :1075A000A8958091C60008959091C00095FFFCCFEA 92 | :1075B0008093C6000895ECDF803239F088E1809333 93 | :1075C000600088E080936000FFCF84E1EDCFCF932F 94 | :1075D000C82FDEDFC150E9F7CF91EDCF20E52CBDFC 95 | :1075E0002A98292F33272EBD0DB407FEFDCF8EBD5F 96 | :1075F0000DB407FEFDCF1EBC0DB407FEFDCF81E02C 97 | :107600008EBD0DB407FEFDCF1EBC0DB407FEFDCF31 98 | :107610002A9A8EB51CBC08950F931F93CF93DF93C6 99 | :107620008C01D62FDBDFC82F6D2FC8010196D6DF66 100 | :107630002C2F30E0322F2227A901482BCA01DF91DD 101 | :10764000CF911F910F91089520E52CBD2A98292FE5 102 | :1076500033272EBD0DB407FEFDCF8EBD0DB407FE42 103 | :10766000FDCF80E88EBD0DB407FEFDCF81E08EBD5D 104 | :107670000DB407FEFDCF4EBD0DB407FEFDCF2A9A17 105 | :107680001CBC08950F931F93CF93DF93EC018B01E4 106 | :10769000472F55276CE6CE01D7DF402F6CE6CE0191 107 | :1076A0000196DF91CF911F910F91CECFCF93DF93B2 108 | :1076B000EC0140E16CE681E093E4C6DF68E681E03E 109 | :1076C00093E48CDF8111FACF4FEF6CE682E093E414 110 | :1076D000BBDF42E06CE680E093E4B6DFBE0184E00D 111 | :1076E00093E4D0DF41E06CE681E093E4ADDF68E64F 112 | :1076F00081E093E473DF8111FACF68E683E093E4DD 113 | :107700006DDF823229F040E16CE681E093E49CDF9A 114 | :1077100068E683E093E462DF8232B1F6DF91CF91D5 115 | :107720000895CF9385E490E0C1DF87E190E066D1D2 116 | :107730008B3B91F489E190E061D1C82F88E190E022 117 | :107740005DD12C2F30E0322F2227280F311D3093AE 118 | :1077500028012093270106C089E797EB9093280121 119 | :1077600080932701CF910895AF92BF92CF92DF927D 120 | :10777000EF92FF920F931F93CF93DF93CDB7DEB7B6 121 | :10778000CD50D240DEBFCDBF68E688E293E444DF4F 122 | :10779000009711F480E098ED9E012F5F3F4F790133 123 | :1077A0005E0133EFA31A3DEFB30A8701A016B106BD 124 | :1077B00091F06C014FEFC41AD40A60E00FDFF801BA 125 | :1077C00081938F01C114F0EEDF0619F4C12C98EDFE 126 | :1077D000D92EC601EBCFBC0188E293E453DF40E42D 127 | :1077E0006CE681E093E430DF68E681E093E4F6DE66 128 | :1077F0008111FACF0CE013E4F70141917F016CE6AF 129 | :10780000C80122DF0F5F1F4F0231F3E41F07A1F70A 130 | :107810008F8190E0982F882728857C01E20EF11C4B 131 | :10782000298530E0322F22278A85280F311D0B85CC 132 | :1078300010E0102F00278C85080F111D2330310513 133 | :1078400079F409331105B8F580912501909126014D 134 | :107850000817190780F101968017910760F126C07B 135 | :1078600045E0E41642E0F40630F524303105D4F466 136 | :107870002130310539F122303105E9F47FDE6FEF37 137 | :1078800082E090E0C3D080912701909128010EDF23 138 | :1078900010922601109225011092240110922301CA 139 | :1078A00022E093C0263031056CF005C0F5E0EF16FC 140 | :1078B000F2E0FF0648F08091270190912801F6DE62 141 | :1078C00021E083C020E081C059DEC70104971093F6 142 | :1078D00024010093230101501109102F0027110FDB 143 | :1078E0009C01200F311F2130304708F06BC08115FB 144 | :1078F000F2E09F0710F424E001C022E0AC014F77D2 145 | :107900005527452B11F00196F9CF0115110599F472 146 | :10791000FE013E96AE014E5B5F4FDF0111973C9139 147 | :107920003C3009F051C03081343909F04DC03496F3 148 | :10793000E417F50791F7DE011E9660E070E031E094 149 | :1079400043E0F42E55E0E52EE1E1DE2E68177907DD 150 | :1079500040F5FD0131974081EC9150E05E2BF8013C 151 | :107960000A0130935700E89511246E5F7F4FAB01F9 152 | :107970004F775527452B89F4EE57F109F0925700C0 153 | :10798000E89507B600FCFDCFE0925700E89507B6F2 154 | :1079900000FCFDCFD0925700E89512960E5F1F4F66 155 | :1079A000D5CF243091F46EEE82E090E0C35FDD4FDE 156 | :1079B0002883CD50D2402AD0C35FDD4F2881CD50DF 157 | :1079C000D24003C023E001C025E0822FC35FDD4F1A 158 | :1079D000DEBFCDBFDF91CF911F910F91FF90EF9050 159 | :1079E000DF90CF90BF90AF900895FB01DC0102C003 160 | :1079F00005900D9241505040D8F70895F999FECF67 161 | :107A000092BD81BDF89A992780B50895262FF999DE 162 | :107A1000FECF1FBA92BD81BD20BD0FB6F894FA9A71 163 | :0C7A2000F99A0FBE01960895F894FFCF6C 164 | :107A2C0080C0A801FEFFFFFF00DEADBEEFFEEDC083 165 | :0C7A3C00A801800000000007D008000036 166 | :040000030000700089 167 | :00000001FF 168 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/ariadne_atmega328_w5500.hex: -------------------------------------------------------------------------------- 1 | :1070000043C00000C0C20000BEC20000BCC20000FD 2 | :10701000BAC20000B8C20000B6C20000B4C200008C 3 | :10702000B2C20000B0C20000AEC20000ACC200009C 4 | :10703000AAC20000A8C20000A6C20000A4C20000AC 5 | :10704000A2C20000A0C200009EC200009CC20000BC 6 | :107050009AC2000098C2000096C2000094C20000CC 7 | :1070600092C2000090C200000005000346756C6CDF 8 | :1070700000000500044F70636F64653F0000050069 9 | :10708000004572726F72000011241FBECFEFD8E06E 10 | :10709000DEBFCDBF11E0A0E0B1E0E2E1FAE702C05F 11 | :1070A00005900D92AC31B107D9F721E0ACE1B1E028 12 | :1070B00001C01D92AB32B207E1F701D0A8C4CDB731 13 | :1070C000DEB7C250D140DEBFCDBF14BE0FB6F894BC 14 | :1070D000A8958091600088618093600010926000A4 15 | :1070E0000FBE99E288E10FB6F894A89580936000EE 16 | :1070F0000FBE909360002FEF83EC99E02150804009 17 | :107100009040E1F700C00000112484E080938100EA 18 | :1071100080E090E066D4882321F060E080E090E099 19 | :1071200068D481E090E05DD4843021F064E081E0B7 20 | :1071300090E05FD482E08093C00088E18093C1003A 21 | :1071400086E08093C20080E18093C4008CE385B91F 22 | :107150008CE284B95C9A549A81E08DBD83E090E022 23 | :1071600040D4853539F040E0E42E41E0F42E00E0D3 24 | :1071700010E016C084E090E034D48A3AA1F731E000 25 | :10718000E32E31E0F32E05E010E0C8012AD4F70128 26 | :1071900081937F010F5F1F4F07311105B1F7E3CFD7 27 | :1071A000F70141917F0164E0C8014DD20F5F1F4F8D 28 | :1071B0000C311105A9F710E0012F0295000F007E98 29 | :1071C000045F42E0602F8EE190E03DD242E0602F0C 30 | :1071D0008FE190E038D21F5F183071F79BD2109288 31 | :1071E000220110922101DD24D3948E010F5F1F4FE5 32 | :1071F0004E01F1E88F0E911C91E1392E23E0C22E51 33 | :10720000A12CB12C809122018111A2C086E290E0D4 34 | :1072100004D2892B09F49CC0D092210168E682E057 35 | :1072200090E0E2D182FF0FC044E06CE682E090E0A3 36 | :107230000AD22FEF87E893E1215080409040E1F798 37 | :1072400000C00000EBCF89D2282E84E290E0E5D187 38 | :107250007C01E2E02E1649F1E21520F0F1E02F1654 39 | :1072600079F006C023E0221699F084E0281661F137 40 | :107270004AE050E06DE770E7C801AAD32AE00FC0EA 41 | :107280004CE050E061E770E7C801A2D32CE007C0F2 42 | :1072900049E050E068E670E7C8019AD329E0380178 43 | :1072A000322F2701401A510A1AC080912301909170 44 | :1072B000240120912501309126012817390720F457 45 | :1072C0009093260180932501198294E09A838091FE 46 | :1072D0002301909124019B838C8324E0E0CFC201A1 47 | :1072E000860D971D3150D0F0F30141913F0164E7C5 48 | :1072F000CE5FDE4F2883C250D140CF5FDE4F388350 49 | :10730000C150D140A0D1CF5FDE4F3881C150D140B4 50 | :10731000CE5FDE4F2881C250D140E1CFB701620F6E 51 | :10732000711D84E290E0A7D140E26CE681E090E03C 52 | :107330008AD168E681E090E057D18111FACFF4E07C 53 | :107340002F1206C040E16CE681E090E07CD106C1DE 54 | :10735000809121018111C3C08091C00087FFBFC00F 55 | :1073600013D1D09222011AD18134B9F417D1CF5F51 56 | :10737000DE4F8883C150D14024D1CF5FDE4F88815A 57 | :10738000C150D140823811F484E003C0813819F42F 58 | :1073900080E010D1A2C083E0FCCF823411F484E1FC 59 | :1073A00003C0853419F484E018D197C0853569F499 60 | :1073B000F5D0F82EF3D02F2D30E0382B220F331FCD 61 | :1073C00030931E0120931D0187C0863519F484E097 62 | :1073D00004D1DECF843609F050C0E0D0DFD08093F6 63 | :1073E0001C01DCD0E0901D01F0901E01E11420E7AB 64 | :1073F000F20620F4F701C0925700E8953801CED08C 65 | :10740000F30181933F0180911C01815080931C0105 66 | :107410008111F5CFE114F0E7FF0620F0F701C092EB 67 | :107420005700E895CED007B600FCFDCF8981D80182 68 | :107430009701201B310BBD01620F731F1296AD0126 69 | :1074400041505109FA01408190E0942BFB010C015D 70 | :10745000D0925700E8951124A815B90511F08C9128 71 | :10746000EACF25E0F70120935700E89507B600FC26 72 | :10747000FDCF30925700E89530C08437D1F48ED0DC 73 | :107480008DD080931C018AD09CD0E0911D01F09199 74 | :107490001E01CF01019690931E0180931D018491DE 75 | :1074A00089D080911C01815080931C018111EDCF06 76 | :1074B00014C0853739F485D08EE17CD085E97AD047 77 | :1074C0008FE067CF813541F47CD06EEE82E090E0B2 78 | :1074D00090D280E16FD042C074D080E16BD0F501D2 79 | :1074E000859194910196B9F08091290190912A019A 80 | :1074F0000A9788F082E090E074D28E3E79F1809114 81 | :107500002101813041F4F501C0925700E89502D184 82 | :107510003BD010922101A895809184009091850024 83 | :1075200094FF05C035B120E2232725B901C02D986D 84 | :1075300020911F01309120018217930750F4209170 85 | :10754000290130912A012F5F3F4F30932A01209368 86 | :1075500029019093200180931F0154CE0FB6F89417 87 | :10756000A89580916000886180936000109260000F 88 | :107570000FBEEE27FF27099480E090E0CE5FDE4F3C 89 | :10758000DEBFCDBF08953CCD1092850010928400DF 90 | :1075900010922A0110922901A89508958091C000A7 91 | :1075A00087FFFCCF8091C00084FD01C0A895809129 92 | :1075B000C60008959091C00095FFFCCF8093C6004F 93 | :1075C0000895ECDF803239F088E18093600088E034 94 | :1075D00080936000FFCF84E1EDCFCF93C82FDEDF33 95 | :1075E000C150E9F7CF91EDCF20E52CBD2A98292F86 96 | :1075F00033272EBD0DB407FEFDCF8EBD0DB407FEA3 97 | :10760000FDCF6EBD0DB407FEFDCF1EBC0DB407FE51 98 | :10761000FDCF2A9A8EB51CBC08950F931F93CF936C 99 | :107620008C0168E6E1DFC82F68E6C8010196DCDF5F 100 | :107630002C2F30E0322F2227A901482BCA01CF91ED 101 | :107640001F910F91089520E52CBD2A98292F3327EB 102 | :107650002EBD0DB407FEFDCF8EBD0DB407FEFDCFD0 103 | :107660006EBD0DB407FEFDCF4EBD0DB407FEFDCFC0 104 | :107670002A9A1CBC08950F931F93CF93DF93EC01BC 105 | :107680008B01472F55276CE6CE01DDDF402F6CE6DE 106 | :10769000CE010196DF91CF911F910F91D4CFCF935F 107 | :1076A000DF93EC0140E16CE681E090E0CCDF68E63E 108 | :1076B00081E090E099DF8111FACF4FEF6CE682E034 109 | :1076C00090E0C1DF42E06CE680E090E0BCDFBE010C 110 | :1076D00084E090E0D0DF41E06CE681E090E0B3DF51 111 | :1076E00068E681E090E080DF8111FACF68E683E010 112 | :1076F00090E07ADF823229F040E16CE681E090E0B0 113 | :10770000A2DF68E683E090E06FDF8232B1F6DF91BE 114 | :10771000CF910895CF9385E490E0C1DF87E190E0B9 115 | :1077200060D18B3B91F489E190E05BD1C82F88E177 116 | :1077300090E057D12C2F30E0322F2227280F311D17 117 | :10774000309328012093270106C089E797EB909397 118 | :10775000280180932701CF9108958F929F92AF9235 119 | :10776000BF92CF92DF92EF92FF920F931F93CF932E 120 | :10777000DF93CDB7DEB7CD50D240DEBFCDBF88E2BC 121 | :1077800090E04BDF8C01CE0101967C015E0193EF0E 122 | :10779000A91A9DEFB90A670148018E189F08C40114 123 | :1077A0008C0D9D1DAC14BD0431F068E71DDFF601A2 124 | :1077B00081936F01F4CFB801645F7D4F88E290E060 125 | :1077C0005ADF40E46CE681E090E03DDF68E681E06E 126 | :1077D00090E00ADF8111FACF0CE010E0F70141914F 127 | :1077E0007F016CE6C8012FDF0F5F1F4F02311105CB 128 | :1077F000A9F78F8190E0982F882728857C01E20ED9 129 | :10780000F11C298530E0322F22278A85280F311D6F 130 | :107810000B8510E0102F00278C85080F111D2330D9 131 | :10782000310579F409331105B8F58091250190915E 132 | :1078300026010817190780F101968017910760F15A 133 | :1078400026C0F5E0EF16F2E0FF0630F524303105F2 134 | :10785000D4F42130310539F122303105E9F494DED8 135 | :107860006FEF82E090E0C5D08091270190912801D0 136 | :1078700016DF109226011092250110922401109219 137 | :10788000230122E093C0263031056CF005C0F5E0FD 138 | :10789000EF16F2E0FF0648F0809127019091280151 139 | :1078A000FEDE21E083C020E081C06EDEC7010497C8 140 | :1078B000109324010093230101501109102F002778 141 | :1078C000110F9C01200F311F2130304708F06BC091 142 | :1078D0008115E2E09E0710F424E001C022E0AC0133 143 | :1078E0004F775527452B11F00196F9CF011511055A 144 | :1078F00099F4FE013E96AE014E5B5F4FDF0111979A 145 | :107900003C913C3009F051C03081343909F04DC010 146 | :107910003496E417F50791F7DE011E9660E070E0FB 147 | :1079200031E043E0F42E55E0E52EE1E1DE2E68176C 148 | :10793000790740F5FD0131974081EC9150E05E2BD5 149 | :10794000F8010A0130935700E89511246E5F7F4FCC 150 | :10795000AB014F775527452B89F4EE57F109F0928B 151 | :107960005700E89507B600FCFDCFE0925700E89578 152 | :1079700007B600FCFDCFD0925700E89512960E5F37 153 | :107980001F4FD5CF243091F46EEE82E090E0C35FBC 154 | :10799000DD4F2883CD50D2402CD0C35FDD4F2881EE 155 | :1079A000CD50D24003C023E001C025E0822FC35F49 156 | :1079B000DD4FDEBFCDBFDF91CF911F910F91FF90C3 157 | :1079C000EF90DF90CF90BF90AF909F908F900895F1 158 | :1079D000FB01DC0102C005900D9241505040D8F7E8 159 | :1079E0000895F999FECF92BD81BDF89A992780B587 160 | :1079F0000895262FF999FECF1FBA92BD81BD20BDF3 161 | :107A00000FB6F894FA9AF99A0FBE01960895F89471 162 | :027A1000FFCFA6 163 | :107A120080C0A801FEFFFFFF00DEADBEEFFEEDC09D 164 | :0C7A2200A8018000000000000007D00850 165 | :040000030000700089 166 | :00000001FF 167 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/debug.c: -------------------------------------------------------------------------------- 1 | /* Name: debug.c 2 | * Author: . 3 | * Copyright: Arduino 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: eboot 6 | * Function: Utility routines for bootloader debugging 7 | * Version: 0.2 tftp / flashing functional, serial flashing 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "serial.h" 15 | #include "util.h" 16 | #include "debug.h" 17 | 18 | 19 | #if defined(ENABLE_DEBUG) 20 | 21 | /* 22 | * Standart strings used throughout the code. 23 | */ 24 | const unsigned char mDebug_NEWLINE[] PROGMEM = "\r\n"; 25 | const unsigned char mDebug_HEXPREF[] PROGMEM = "0x"; 26 | 27 | void tracePGM(const void* p_msg) 28 | { 29 | uint8_t c = 1, i = 0; 30 | 31 | while(c != 0){ 32 | #if (FLASHEND > 0x10000) 33 | /* 0x30000 was added to fix the issues of progmem with >64Kb flash. 34 | * 0x30000 is specific to atmega2560 and won't work on smaller or larger flashes. 35 | * I should find a way to macro the calculation of this value 36 | */ 37 | c = pgm_read_byte_far(PROGMEM_OFFSET + (uint32_t)(uint16_t)p_msg + i); 38 | #else 39 | c = pgm_read_byte_near((uint16_t)p_msg + i); 40 | #endif 41 | if (c != 0) putch(c); 42 | i++; 43 | } 44 | } 45 | 46 | 47 | void tracePGMln(const void* p_prefix, const void* p_msg) 48 | { 49 | tracePGM(mDebug_NEWLINE); 50 | tracePGM(p_prefix); 51 | tracePGM(p_msg); 52 | } 53 | 54 | 55 | void trace(char* msg) 56 | { 57 | uint8_t c; 58 | 59 | if(*msg != '\0') { 60 | while((c = *msg++)) putch(c); 61 | } 62 | } 63 | 64 | 65 | void traceln(const void* p_prefix, char* msg) 66 | { 67 | tracePGM(mDebug_NEWLINE); 68 | tracePGM(p_prefix); 69 | trace(msg); 70 | } 71 | 72 | 73 | void tracehex(uint32_t num, uint8_t len) 74 | { 75 | tracePGM(mDebug_HEXPREF); 76 | 77 | while(len > 0) { 78 | puthex(num >> (4 * (len - 1))); 79 | len--; 80 | } 81 | } 82 | 83 | 84 | #if defined(DEBUG_BTN) 85 | #undef DBG_BTN 86 | #define DBG_BTN(block) block 87 | #define tracePGMlnBtn(msg) tracePGMln(mDebugBtn_PREFIX, msg) 88 | const unsigned char mDebugBtn_PREFIX[] PROGMEM = " Dbg: "; 89 | const unsigned char mDebugBtn_INIT[] PROGMEM = "Button enabled"; 90 | const unsigned char mDebugBtn_WAIT[] PROGMEM = "Wait input"; 91 | 92 | void buttonInit(void) 93 | { 94 | PORTB |= _BV(PB0); 95 | DBG_BTN(tracePGMlnBtn(mDebugBtn_INIT);) 96 | } 97 | 98 | 99 | /* FIXME: the button used was reverse, shortcircuiting when it is released. Code was modified 100 | * accordingly */ 101 | uint8_t checkButton(void) 102 | { 103 | /* the button is pressed when BUTTON_BIT is clear */ 104 | if(bit_is_clear(PINB, PB0)) { 105 | _delay_ms(25); 106 | 107 | if(bit_is_clear(PINB, PB0)) return 0; 108 | } 109 | 110 | return 1; 111 | } 112 | 113 | 114 | void button(void) 115 | { 116 | DBG_BTN(tracePGMlnBtn(mDebugBtn_WAIT);) 117 | 118 | while(1) if(checkButton()) break; 119 | 120 | _delay_ms(250); // Lock input 121 | } 122 | #endif 123 | 124 | #endif 125 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef debug_h 2 | #define debug_h 3 | 4 | /* 5 | * Define DBG_* dummy macros. These disable the debugging code if they aren't 6 | * overriden later on in the subsytem sections. 7 | */ 8 | #define DBG_MAIN(block) 9 | #define DBG_MAIN_EX(block) 10 | #define DBG_NET(block) 11 | #define DBG_NET_EX(block) 12 | #define DBG_SPI(block) 13 | #define DBG_SPI_EX(block) 14 | #define DBG_TFTP(block) 15 | #define DBG_TFTP_EX(block) 16 | #define DBG_VALD(block) 17 | #define DBG_UTIL(block) 18 | #define DBG_BTN(block) 19 | #define DBG_ANN(block) 20 | 21 | #if (DEBUG_ALL > 1) 22 | #define DEBUG_MAIN 2 23 | #define DEBUG_SPI 2 24 | #define DEBUG_NET 2 25 | #define DEBUG_TFTP 2 26 | #define DEBUG_VALD 2 27 | #define DEBUG_UTIL 2 28 | #define DEBUG_ANN 2 29 | #elif (DEBUG_ALL > 0) 30 | #define DEBUG_MAIN 1 31 | #define DEBUG_SPI 1 32 | #define DEBUG_NET 1 33 | #define DEBUG_TFTP 1 34 | #define DEBUG_VALD 1 35 | #define DEBUG_UTIL 1 36 | #define DEBUG_ANN 1 37 | #endif 38 | 39 | #if (DEBUG_MAIN > 0) || (DEBUG_NET > 0) || (DEBUG_TFTP > 0) || (DEBUG_VALD > 0) ||\ 40 | (DEBUG_UTIL > 0) || (DEBUG_ANN > 0) || (DEBUG_BTN > 0) || (DEBUG_SPI > 0) 41 | #define ENABLE_DEBUG 42 | #endif 43 | 44 | #if defined(ENABLE_DEBUG) 45 | 46 | void tracePGM(const void* p_msg); 47 | void tracePGMln(const void* p_prefix, const void* p_msg); 48 | void tracehex(uint32_t num, uint8_t len); 49 | void trace(char* msg); 50 | void traceln(const void* p_prefix, char* msg); 51 | 52 | #define traceadd(num) tracehex(num, 6) 53 | #define tracenum(num) tracehex(num, 4) 54 | #define tracenet(num) tracehex(num, 2) 55 | 56 | #if defined(DEBUG_BTN) 57 | void buttonInit(void); 58 | void button(void); 59 | #endif 60 | 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/debug_ann.h: -------------------------------------------------------------------------------- 1 | /* Name: debug_ann.h 2 | * Author: Stelios Tsampas 3 | * Copyright: codebender.cc 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: ariadne 6 | * Function: debugging progmem strings 7 | * Version: 0.5 "Mega2560" 8 | */ 9 | 10 | #ifndef debug_ann_h 11 | #define debug_ann_h 12 | 13 | #include 14 | 15 | #if defined(ANNOUNCE) 16 | 17 | #if (DEBUG_ANN > 0) 18 | #undef DBG_ANN 19 | #define DBG_ANN(block) block 20 | #define tracePGMlnAnn(msg) tracePGMln(mDebugAnn_PREFIX, msg) 21 | const unsigned char mDebugAnn_PREFIX[] PROGMEM = " Ann: "; 22 | const unsigned char mDebugAnn_DONE[] PROGMEM = "Broadcast init done"; 23 | #endif 24 | 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/debug_main.h: -------------------------------------------------------------------------------- 1 | /* Name: debug_msg.h 2 | * Author: Stelios Tsampas 3 | * Copyright: codebender.cc 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: ariadne 6 | * Function: debugging progmem strings 7 | * Version: 0.5 "Mega2560" 8 | */ 9 | 10 | #ifndef debug_main_h 11 | #define debug_main_h 12 | 13 | #include 14 | 15 | #if (DEBUG_MAIN > 0) 16 | #undef DBG_MAIN 17 | #define DBG_MAIN(block) block 18 | #define tracePGMlnMain(msg) tracePGMln(mDebugMain_PREFIX, msg) 19 | const unsigned char mDebugMain_PREFIX[] PROGMEM = "Main: "; 20 | 21 | #if defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__) 22 | #if defined(ARDUINO_ETHERNET) 23 | const unsigned char mDebugMain_TITLE[] PROGMEM = "Ariadne for Arduino Ethernet, Version 0.5"; 24 | #else 25 | const unsigned char mDebugMain_TITLE[] PROGMEM = "Ariadne for Arduino Uno, Version 0.5"; 26 | #endif 27 | #elif defined(__AVR_ATmega2560__) 28 | const unsigned char mDebugMain_TITLE[] PROGMEM = "Ariadne for Arduino Mega2560, Version 0.5"; 29 | #elif defined(__AVR_ATmega1284P__) 30 | const unsigned char mDebugMain_TITLE[] PROGMEM = "Ariadne for Arduino Mega1284P, Version 0.5"; 31 | #else 32 | const unsigned char mDebugMain_TITLE[] PROGMEM = "Unknown MCU with ariadne, Version 0.5"; 33 | #endif 34 | const unsigned char mDebugMain_EXIT[] PROGMEM = "Start user app"; 35 | #if (DEBUG_MAIN > 1) 36 | #undef DBG_MAIN_EX 37 | #define DBG_MAIN_EX(block) block 38 | const unsigned char mDebugMain_SPI[] PROGMEM = "Init spi comm"; 39 | const unsigned char mDebugMain_NET[] PROGMEM = "Init network layer"; 40 | const unsigned char mDebugMain_TFTP[] PROGMEM = "Init tftp server"; 41 | #if defined(DEBUG_BTN) 42 | const unsigned char mDebugMain_BTN[] PROGMEM = "Init button debugging"; 43 | #endif 44 | #if defined(ANNOUNCE) 45 | const unsigned char mDebugMain_ANN[] PROGMEM = "Init network announce"; 46 | #endif 47 | #endif 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/debug_net.h: -------------------------------------------------------------------------------- 1 | /* Name: debug_msg.h 2 | * Author: Stelios Tsampas 3 | * Copyright: codebender.cc 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: ariadne 6 | * Function: debugging progmem strings 7 | * Version: 0.5 "Mega2560" 8 | */ 9 | 10 | #ifndef debug_net_h 11 | #define debug_net_h 12 | 13 | #include 14 | 15 | 16 | #if (DEBUG_NET > 0) 17 | #undef DBG_NET 18 | #define DBG_NET(block) block 19 | #define tracePGMlnNet(msg) tracePGMln(mDebugNet_PREFIX, msg) 20 | const unsigned char mDebugNet_PREFIX[] PROGMEM = " Net: "; 21 | const unsigned char mDebugNet_EEPROM[] PROGMEM = "EEPROM settings"; 22 | const unsigned char mDebugNet_BUILTIN[] PROGMEM = "Built-in settings"; 23 | const unsigned char mDebugNet_ADDR[] PROGMEM = "\tAddress: "; 24 | const unsigned char mDebugNet_SUBN[] PROGMEM = "\t Subnet: "; 25 | const unsigned char mDebugNet_GW[] PROGMEM = "\tGateway: "; 26 | const unsigned char mDebugNet_MAC[] PROGMEM = "\t MAC: "; 27 | const unsigned char mDebugNet_DONE[] PROGMEM = "Network init done"; 28 | #if (DEBUG_NET > 1) 29 | #undef DBG_NET_EX 30 | #define DBG_NET_EX(block) block 31 | #endif 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/debug_spi.h: -------------------------------------------------------------------------------- 1 | /* Name: debug_spi.h 2 | * Author: Stelios Tsampas 3 | * Copyright: codebender.cc 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: ariadne 6 | * Function: debugging progmem strings for SPI subsystem 7 | * Version: 0.5 "Mega2560" 8 | */ 9 | 10 | #ifndef debug_spi_h 11 | #define debug_spi_h 12 | 13 | #include 14 | 15 | 16 | #if (DEBUG_SPI > 0) 17 | #undef DBG_SPI 18 | #define DBG_SPI(block) block 19 | #define tracePGMlnSpi(msg) tracePGMln(mDebugSpi_PREFIX, msg) 20 | const unsigned char mDebugSpi_PREFIX[] PROGMEM = " Spi: "; 21 | const unsigned char mDebugSpi_DONE[] PROGMEM = "SPI init done"; 22 | #if (DEBUG_SPI > 1) 23 | #undef DBG_SPI_EX 24 | #define DBG_SPI_EX(block) block 25 | const unsigned char mDebugSpi_COMMA[] PROGMEM = ", "; 26 | const unsigned char mDebugSpi_NWREG[] PROGMEM = "spiWriteReg: "; 27 | const unsigned char mDebugSpi_NRREG[] PROGMEM = "spiReadReg: "; 28 | #endif 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/debug_tftp.h: -------------------------------------------------------------------------------- 1 | /* Name: debug_msg.h 2 | * Author: Stelios Tsampas 3 | * Copyright: codebender.cc 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: ariadne 6 | * Function: debugging progmem strings 7 | * Version: 0.5 "Mega2560" 8 | */ 9 | 10 | #ifndef debug_tftp_h 11 | #define debug_tftp_h 12 | 13 | #include 14 | 15 | #if (DEBUG_TFTP > 0) 16 | #undef DBG_TFTP 17 | #define DBG_TFTP(block) block 18 | #define tracePGMlnTftp(msg) tracePGMln(mDebugTftp_PREFIX, msg) 19 | const unsigned char mDebugTftp_PREFIX[] PROGMEM = "Tftp: "; 20 | const unsigned char mDebugTftp_START[] PROGMEM = "Processing packet of size "; 21 | const unsigned char mDebugTftp_OVFL[] PROGMEM = "Overflow"; 22 | const unsigned char mDebugTftp_RADDR[] PROGMEM = "Set up return address"; 23 | const unsigned char mDebugTftp_BLOCK[] PROGMEM = "This is block "; 24 | const unsigned char mDebugTftp_OPCODE[] PROGMEM = " with opcode "; 25 | const unsigned char mDebugTftp_DLEN[] PROGMEM = " and data length "; 26 | const unsigned char mDebugTftp_OPRRQ[] PROGMEM = "Read request"; 27 | const unsigned char mDebugTftp_OPWRQ[] PROGMEM = "Write request"; 28 | const unsigned char mDebugTftp_OPDATA[] PROGMEM = "Data block"; 29 | const unsigned char mDebugTftp_NPORT[] PROGMEM = "Changed to port "; 30 | const unsigned char mDebugTftp_FULL[] PROGMEM = "Flash is full"; 31 | const unsigned char mDebugTftp_WRADDR[] PROGMEM = "Writing data from address "; 32 | const unsigned char mDebugTftp_PLEN[] PROGMEM = "Packet length adjusted to "; 33 | const unsigned char mDebugTftp_DONE[] PROGMEM = "Flashing complete"; 34 | const unsigned char mDebugTftp_OPACK[] PROGMEM = "Acknowledge"; 35 | const unsigned char mDebugTftp_OPERR[] PROGMEM = "Error"; 36 | const unsigned char mDebugTftp_INVOP[] PROGMEM = "Invalid opcode "; 37 | const unsigned char mDebugTftp_SACK[] PROGMEM = "Sent ACK"; 38 | const unsigned char mDebugTftp_SFACK[] PROGMEM = "Sent Final ACK"; 39 | const unsigned char mDebugTftp_RESP[] PROGMEM = "Response sent"; 40 | const unsigned char mDebugTftp_INIT[] PROGMEM = "TFTP server init done"; 41 | const unsigned char mDebugTftp_PORT[] PROGMEM = "\tDataPort: "; 42 | const unsigned char mDebugTftp_SOCK[] PROGMEM = "Init socket to port "; 43 | #if (DEBUG_TFTP > 1) 44 | #undef DBG_TFTP_EX 45 | #define DBG_TFTP_EX(block) block 46 | const unsigned char mDebugTftp_NEWLINE[] PROGMEM = "\r\n"; 47 | const unsigned char mDebugTftp_RPTR[] PROGMEM = "readPointer at position "; 48 | const unsigned char mDebugTftp_RPOS[] PROGMEM = "Reading from position "; 49 | const unsigned char mDebugTftp_BLEFT[] PROGMEM = "Bytes left "; 50 | const unsigned char mDebugTftp_WRITE[] PROGMEM = "Writing "; 51 | const unsigned char mDebugTftp_OFFSET[] PROGMEM = " at offset "; 52 | #endif 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/debug_util.h: -------------------------------------------------------------------------------- 1 | /* Name: debug_msg.h 2 | * Author: Stelios Tsampas 3 | * Copyright: codebender.cc 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: ariadne 6 | * Function: debugging progmem strings 7 | * Version: 0.5 "Mega2560" 8 | */ 9 | 10 | #ifndef debug_util_h 11 | #define debug_util_h 12 | 13 | #include 14 | 15 | #if (DEBUG_UTIL > 0) 16 | #undef DBG_UTIL 17 | #define DBG_UTIL(block) block 18 | #define tracePGMlnUtil(msg) tracePGMln(mDebugUtil_PREFIX, msg) 19 | const unsigned char mDebugUtil_PREFIX[] PROGMEM = "Util: "; 20 | const unsigned char mDebugUtil_TICK[] PROGMEM = "Tick "; 21 | const unsigned char mDebugUtil_NEXT[] PROGMEM = "nTM "; 22 | const unsigned char mDebugUtil_LAST[] PROGMEM = "lTM "; 23 | #endif 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/debug_vald.h: -------------------------------------------------------------------------------- 1 | /* Name: debug_vald.h 2 | * Author: Stelios Tsampas 3 | * Copyright: codebender.cc 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: ariadne 6 | * Function: debugging progmem strings 7 | * Version: 0.5 "Mega2560" 8 | */ 9 | 10 | #ifndef debug_vald_h 11 | #define debug_vald_h 12 | 13 | #include 14 | 15 | #if (DEBUG_VALD > 0) 16 | #undef DBG_VALD 17 | #define DBG_VALD(block) block 18 | #define tracePGMlnVald(msg) tracePGMln(mDebugVald_PREFIX, msg) 19 | const unsigned char mDebugVald_PREFIX[] PROGMEM = "Vald: "; 20 | const unsigned char mDebugVald_VALID[] PROGMEM = "Valid image"; 21 | const unsigned char mDebugVald_FAILED[] PROGMEM = "Failed at "; 22 | const unsigned char mDebugVald_WITH[] PROGMEM = " with "; 23 | const unsigned char mDebugVald_0x0C[] PROGMEM = " instead of 0x0C"; 24 | const unsigned char mDebugVald_0x94[] PROGMEM = " instead of 0x94"; 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/main.c: -------------------------------------------------------------------------------- 1 | /* Name: main.c 2 | * Author: . 3 | * Copyright: Arduino 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: tftpboot 6 | * Function: Bootloader core 7 | * Version: 0.2 support for USB flashing 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "util.h" 16 | #include "spi.h" 17 | #include "net.h" 18 | #include "tftp.h" 19 | #include "serial.h" 20 | #include "neteeprom.h" 21 | #include "watchdog.h" 22 | #include "debug.h" 23 | #include "debug_main.h" 24 | #if defined(ANNOUNCE) 25 | #include "announce.h" 26 | #endif 27 | 28 | 29 | int main(void) __attribute__ ((OS_main)) __attribute__ ((section (".init9"))); 30 | void appStart(void) __attribute__ ((naked)); 31 | 32 | int main(void) 33 | { 34 | uint8_t ch; 35 | 36 | /* This code makes the following assumptions: 37 | * No interrupts will execute 38 | * SP points to RAMEND 39 | * r1 contains zero 40 | * If not, uncomment the following instructions. */ 41 | //cli(); 42 | asm volatile("clr __zero_reg__"); 43 | #if defined(__AVR_ATmega8__) 44 | SP = RAMEND; // This is done by hardware reset 45 | #endif 46 | 47 | /* Disable the watchdog timer to prevent 48 | * eternal reset loop of doom and despair */ 49 | ch = MCUSR; 50 | MCUSR = 0; 51 | if(ch & (_BV(WDRF) | _BV(BORF) | _BV(PORF))) 52 | if(eeprom_read_byte(EEPROM_IMG_STAT) == EEPROM_IMG_OK_VALUE) 53 | appStart(); 54 | wdt_enable(WDTO_8S); 55 | 56 | // Wait to ensure startup of W5100 57 | _delay_ms(200); 58 | 59 | 60 | 61 | // Prescaler=0, ClkIO Period = 62,5ns 62 | // TCCR1B values: 63 | // 0x01 -> ClkIO/1 -> 62,5ns period, 4ms max 64 | // 0x02 -> ClkIO/8 -> 500ns period, 32ms max 65 | // 0X03 -> ClkIO/64 -> 4us period, 256ms max 66 | // 0x04 -> ClkIO/256 -> 16us period, 1024ms max 67 | // 0x05 -> ClkIO/1024 -> 64us period, 4096ms max 68 | // Set up Timer 1 as timekeeper for LED flashing 69 | TCCR1B = _BV(CS12); // Same thing as TCCR1B = 0x04; 70 | 71 | /* Write version information in the EEPROM */ 72 | if(eeprom_read_byte(EEPROM_MAJVER) != ARIADNE_MAJVER) 73 | eeprom_write_byte(EEPROM_MAJVER, ARIADNE_MAJVER); 74 | if(eeprom_read_byte(EEPROM_MINVER) != ARIADNE_MINVER) 75 | eeprom_write_byte(EEPROM_MINVER, ARIADNE_MINVER); 76 | 77 | /* Initialize UART communication */ 78 | serialInit(); 79 | DBG_MAIN(tracePGMlnMain(mDebugMain_TITLE);) 80 | 81 | DBG_BTN( 82 | DBG_MAIN_EX(tracePGMlnMain(mDebugMain_BTN);) 83 | buttonInit(); 84 | ) 85 | 86 | /* Initalize SPI communication */ 87 | DBG_MAIN_EX(tracePGMlnMain(mDebugMain_SPI);) 88 | spiInit(); 89 | /* Initialize networking */ 90 | DBG_MAIN_EX(tracePGMlnMain(mDebugMain_NET);) 91 | netInit(); 92 | 93 | /* Initialize the UDP socket for tftp */ 94 | DBG_MAIN_EX(tracePGMlnMain(mDebugMain_TFTP);) 95 | tftpInit(); 96 | 97 | /* This code is to be used with the java-client inherited from the 98 | * Arduino project. We don't support it and it adds about 99 | * 600 bytes to the binary. So off it goes */ 100 | #if defined(ANNOUNCE) 101 | DBG_MAIN_EX(tracePGMlnMain(mDebugMain_ANN);) 102 | announceInit(); 103 | #endif 104 | 105 | serialFlashing = FALSE; 106 | tftpFlashing = FALSE; 107 | 108 | for(;;) { 109 | // If there is no serial flashing under way, poll tftp 110 | if(!serialFlashing) 111 | // If tftp recieved a FINAL_ACK, break 112 | if(tftpPoll() == 0) break; 113 | 114 | // If there is no tftp flashing, poll serial 115 | if(!tftpFlashing) 116 | // If flashing is done exit 117 | if(serialPoll() == 0) break; 118 | 119 | /* As explained above this goes out */ 120 | #if defined(ANNOUNCE) 121 | announcePoll(); 122 | #endif 123 | 124 | if(timedOut()) { 125 | if(eeprom_read_byte(EEPROM_IMG_STAT) == EEPROM_IMG_OK_VALUE) break; 126 | 127 | //TODO: determine the conditions for reseting server OR reseting socket 128 | if(tftpFlashing == TRUE) { 129 | // Delete first page of flash memory 130 | boot_page_erase(0); 131 | // Reinitialize TFTP 132 | tftpInit(); 133 | // Reset the timeout counter 134 | resetTick(); 135 | // Unset tftp flag 136 | tftpFlashing = FALSE; 137 | } 138 | } 139 | wdt_reset(); 140 | /* Blink the notification led */ 141 | wdt_reset(); //Required so it doesn`t hang. 142 | updateLed(); 143 | } 144 | 145 | /* Exit to user application */ 146 | appStart(); 147 | //return(0); /* never reached */ 148 | } 149 | 150 | void appStart(void) { 151 | wdt_disable(); 152 | asm volatile( 153 | "clr r30 \n\t" 154 | "clr r31 \n\t" 155 | "ijmp \n\t" 156 | ); 157 | } 158 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/makerelease: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | make clean 3 | # 4 | # The standard bootloaders. 5 | make atmega1284_w5100 6 | make atmega1284_w5200 7 | make atmega1284_w5500 8 | 9 | make atmega2560_w5100 10 | make atmega2560_w5200 11 | make atmega2560_w5500 12 | 13 | make atmega328_ethernet 14 | 15 | make atmega328_w5100 16 | make atmega328_w5200 17 | make atmega328_w5500 18 | 19 | make debug1284_w5100 20 | make debug1284_w5200 21 | make debug1284_w5500 22 | 23 | make debug2560_w5100 24 | make debug2560_w5200 25 | make debug2560_w5500 26 | 27 | make debug328_w5100 28 | make debug328_w5200 29 | make debug328_w5500 30 | 31 | cp *.hex ../../avr/bootloaders/ariadne/ 32 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/net.c: -------------------------------------------------------------------------------- 1 | /* Name: net_w5100.c 2 | * Author: . 3 | * Copyright: Arduino 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: eboot 6 | * Function: Network initialization 7 | * Version: 0.1 tftp / flashing functional 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | #include "spi.h" 14 | #include "net.h" 15 | #include "neteeprom.h" 16 | #include "serial.h" 17 | #include "debug.h" 18 | #include "debug_net.h" 19 | 20 | 21 | uint8_t registerBuffer[REGISTER_BLOCK_SIZE] = { 22 | 0x80, // MR Mode - reset device 23 | 24 | // EEPROM block starts here 25 | GW_ADDR, // GWR Gateway IP Address Register 26 | SUB_MASK, // SUBR Subnet Mask Register 27 | MAC_ADDR, // SHAR Source Hardware Address Register 28 | IP_ADDR, // SIPR Source IP Address Register 29 | // EEPROM block ends here 30 | 31 | #if defined(__WIZ_W5100__) 32 | 0, 0, // Reserved locations 33 | 0, // IR Interrupt Register 34 | 0, // IMR Interrupt Mask Register 35 | 0x07, 0xd0, // RTR Retry Time-value Register 36 | 0x80, // RCR Retry Count Register 37 | 0x55, // RMSR Rx Memory Size Register, 2K per socket 38 | 0x55 // TMSR Tx Memory Size Register, 2K per socket 39 | #elif defined(__WIZ_W5200__) 40 | 0, 0, // Reserved locations 41 | 0, // IR Interrupt Register 42 | 0, // IMR Interrupt Mask Register 43 | 0x07, 0xd0, // RTR Retry Time-value Register 44 | 0x08, // RCR Retry Count Register 45 | 0, // Reserved in w5200 46 | 0 // Reserved in w5200 47 | #elif defined(__WIZ_W5500__) 48 | 0, 0, // Interrupt Low Level Timer (INTLEVEL0), (INTLEVEL1) (0x0013, 0x0014) 49 | 0, // IR Interrupt Register (0x0015) 50 | 0, // IMR Interrupt Mask Register (0x0016) 51 | 0, // Socket Interrupt (SIR) (0x0017) 52 | 0, // Socket Interrupt Mask (SIMR) (0x0018) 53 | 0x07, 0xd0, // RTR Retry Time-value Register ((RTR0),(RTR0)) (0x0019,0x001A) 54 | 0x08, // RCR Retry Count Register (0x001B) 55 | #endif 56 | }; 57 | 58 | 59 | void netInit(void) 60 | { 61 | uint8_t i; 62 | 63 | /* Pull in altered network settings, if available, 64 | * from AVR EEPROM (if signature bytes are set) */ 65 | if((eeprom_read_byte(EEPROM_SIG_1) == EEPROM_SIG_1_VALUE) 66 | && (eeprom_read_byte(EEPROM_SIG_2) == EEPROM_SIG_2_VALUE)) { 67 | 68 | for(i = 0; i < EEPROM_SETTINGS_SIZE; i++) 69 | registerBuffer[i + 1] = eeprom_read_byte(EEPROM_DATA + i); 70 | 71 | DBG_NET(tracePGMlnNet(mDebugNet_EEPROM);) 72 | 73 | } 74 | DBG_NET( 75 | else tracePGMlnNet(mDebugNet_BUILTIN); 76 | ) 77 | 78 | 79 | DBG_NET( 80 | tracePGMlnNet(mDebugNet_ADDR); 81 | for(i = 15; i < 19; i++) { 82 | tracenet(registerBuffer[i]); 83 | if(i != 18) putch(0x2E); 84 | } 85 | tracePGMlnNet(mDebugNet_SUBN); 86 | for(i = 5; i < 9; i++) { 87 | tracenet(registerBuffer[i]); 88 | if(i != 8) putch(0x2E); 89 | } 90 | tracePGMlnNet(mDebugNet_GW); 91 | for(i = 1; i < 5; i++) { 92 | tracenet(registerBuffer[i]); 93 | if(i != 4) putch(0x2E); 94 | } 95 | tracePGMlnNet(mDebugNet_MAC); 96 | for(i = 9; i < 15; i++) { 97 | tracenet(registerBuffer[i]); 98 | if(i != 14) putch(0x2E); 99 | } 100 | ) 101 | 102 | /** Configure Wiznet chip. Network settings */ 103 | #if defined(__WIZ_W5200__) 104 | for(i = 0; i < REGISTER_BLOCK_SIZE-2; i++) 105 | #else 106 | for(i = 0; i < REGISTER_BLOCK_SIZE; i++) 107 | #endif 108 | #if defined(__WIZ_W5500__) 109 | spiWriteReg(i, 0x04, registerBuffer[i]); 110 | #else 111 | spiWriteReg(i, 0, registerBuffer[i]); 112 | #endif 113 | 114 | #if defined(__WIZ_W5200__) 115 | for (i=0; i<8; i++) { 116 | spiWriteReg((0x4000 + i * 0x100 + 0x001F), 0, 0x02); 117 | spiWriteReg((0x4000 + i * 0x100 + 0x001E), 0, 0x02); 118 | } 119 | #elif defined(__WIZ_W5500__) 120 | for (int i=0; i<8; i++) { 121 | uint8_t cntl_byte = (0x0C + (i<<5)); 122 | spiWriteReg(0x1E, cntl_byte, 2);//0x1E - Sn_RXBUF_SIZE 123 | spiWriteReg(0x1F, cntl_byte, 2);//0x1F - Sn_TXBUF_SIZE 124 | } 125 | #endif 126 | 127 | DBG_NET(tracePGMlnNet(mDebugNet_DONE);) 128 | } 129 | 130 | // kate: indent-mode cstyle; indent-width 4; replace-tabs on; tab-width 4; 131 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/net.h: -------------------------------------------------------------------------------- 1 | #ifndef net_h 2 | #define net_h 3 | 4 | #if defined(__WIZ_W5100__) 5 | #include "w5100.h" 6 | #elif defined(__WIZ_W5200__) 7 | #include "w5200.h" 8 | #elif defined(__WIZ_W5500__) 9 | #include "w5500.h" 10 | #else 11 | #error "Unknown PHY. Cannot find the proper network driver." 12 | #endif 13 | 14 | /* Network settings */ 15 | #define IP_ADDR 192,168,1,128 16 | #define SUB_MASK 255,255,255,0 17 | #define GW_ADDR 192,168,1,254 18 | #define MAC_ADDR 0xDE,0xAD,0xBE,0xEF,0xFE,0xED 19 | 20 | void netInit(void); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/neteeprom.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* EEPROM partitioning */ 4 | #define EEPROM_MAJVER ((uint8_t*)0) 5 | #define EEPROM_MINVER ((uint8_t*)1) 6 | #define EEPROM_IMG_STAT ((uint8_t*)2) 7 | #define EEPROM_SIG_1 ((uint8_t*)3) 8 | #define EEPROM_SIG_2 ((uint8_t*)4) 9 | #define EEPROM_DATA ((uint8_t*)5) 10 | #define EEPROM_GW ((uint8_t*)5) 11 | #define EEPROM_SN ((uint8_t*)9) 12 | #define EEPROM_MAC ((uint8_t*)13) 13 | #define EEPROM_IP ((uint8_t*)19) 14 | #define EEPROM_SIG_3 ((uint8_t*)23) 15 | #define EEPROM_PORT ((uint8_t*)24) 16 | #define EEPROM_SIG_4 ((uint8_t*)26) 17 | #define EEPROM_PASS ((uint8_t*)27) 18 | #define EEPROM_END ((uint8_t*)63) 19 | 20 | #define EEPROM_SETTINGS_SIZE 18 21 | #define REGISTER_BLOCK_SIZE 28 22 | 23 | /* EEPROM values */ 24 | #define ARIADNE_MAJVER 0 25 | #define ARIADNE_MINVER 4 26 | 27 | #define EEPROM_IMG_OK_VALUE (0xEE) 28 | #define EEPROM_IMG_BAD_VALUE (0xFF) 29 | 30 | #define EEPROM_SIG_1_VALUE (0x55) 31 | #define EEPROM_SIG_2_VALUE (0xAA) 32 | #define EEPROM_SIG_3_VALUE (0xBB) 33 | #define EEPROM_SIG_4_VALUE (0xCC) 34 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/omake: -------------------------------------------------------------------------------- 1 | echo ../../../tools/avr/bin/make OS=macosx ENV=arduino $* 2 | ../../../tools/avr/bin/make OS=macosx ENV=arduino $* 3 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/omake.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\tools\avr\utils\bin\make OS=windows ENV=arduino %* 2 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/optiboot.c: -------------------------------------------------------------------------------- 1 | /* Name: optiboot.c 2 | * Author: . 3 | * Copyright: Stelios Tsampas based on the optiboot bootloader 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: Ariadne bootloader 6 | * Function: optiboot flasher 7 | * Version: 0.2 support for USB flashing 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "util.h" 17 | #include "serial.h" 18 | #include "watchdog.h" 19 | #include "neteeprom.h" 20 | #include "optiboot.h" 21 | #include "optiboot_stk500.h" 22 | 23 | 24 | static uint16_t address = 0; 25 | static uint8_t length; 26 | 27 | static void verifySpace(void) 28 | { 29 | if(getch() != CRC_EOP) { 30 | WDTCSR = _BV(WDCE) | _BV(WDE); 31 | WDTCSR = WATCHDOG_16MS; // shorten WD timeout 32 | while(1) // and busy-loop so that WD causes 33 | ; // a reset and app start. 34 | } 35 | putch(STK_INSYNC); 36 | } 37 | 38 | 39 | static void getNch(uint8_t count) 40 | { 41 | do getch(); 42 | while(--count); 43 | verifySpace(); 44 | } 45 | 46 | 47 | uint8_t processOptiboot(void) 48 | { 49 | uint8_t ch; 50 | 51 | ch = getch(); 52 | 53 | if(ch == STK_GET_PARAMETER) { 54 | unsigned char which = getch(); 55 | verifySpace(); 56 | if(which == 0x82) { 57 | /* 58 | * Send tftpboot version as "minor SW version" 59 | */ 60 | putch(ARIADNE_MINVER); 61 | } else if(which == 0x81) { 62 | putch(ARIADNE_MAJVER); 63 | } else { 64 | /* 65 | * GET PARAMETER returns a generic 0x03 reply for 66 | * other parameters - enough to keep Avrdude happy 67 | */ 68 | putch(0x03); 69 | } 70 | } else if(ch == STK_SET_DEVICE) { 71 | // SET DEVICE is ignored 72 | getNch(20); 73 | } else if(ch == STK_SET_DEVICE_EXT) { 74 | // SET DEVICE EXT is ignored 75 | getNch(4); 76 | } else if(ch == STK_LOAD_ADDRESS) { 77 | // LOAD ADDRESS 78 | uint16_t newAddress; 79 | newAddress = getch(); 80 | newAddress = (newAddress & 0xff) | (getch() << 8); 81 | 82 | #ifdef RAMPZ 83 | // Transfer top bit to RAMPZ 84 | RAMPZ = (newAddress & 0x8000) ? 1 : 0; 85 | #endif 86 | 87 | newAddress += newAddress; // Convert from word address to byte address 88 | address = newAddress; 89 | verifySpace(); 90 | } else if(ch == STK_UNIVERSAL) { 91 | // UNIVERSAL command is ignored 92 | getNch(4); 93 | putch(0x00); 94 | } 95 | /* Write memory, length is big endian and is in bytes */ 96 | else if(ch == STK_PROG_PAGE) { 97 | // This should probably go somewhere but I don't yet know it's place 98 | //eeprom_write_byte(EEPROM_IMG_STAT, EEPROM_IMG_BAD_VALUE); 99 | // PROGRAM PAGE - we support flash programming only, not EEPROM 100 | uint8_t buff[256]; 101 | uint8_t* bufPtr; 102 | uint16_t addrPtr; 103 | 104 | getch(); /* getlen() */ 105 | length = getch(); 106 | getch(); 107 | 108 | // If we are in RWW section, immediately start page erase 109 | if(address < NRWWSTART) boot_page_erase((uint16_t)(void*)address); 110 | 111 | // While that is going on, read in page contents 112 | bufPtr = buff; 113 | do* bufPtr++ = getch(); 114 | while(--length); 115 | 116 | // If we are in NRWW section, page erase has to be delayed until now. 117 | // Todo: Take RAMPZ into account 118 | if(address >= NRWWSTART) boot_page_erase((uint16_t)(void*)address); 119 | 120 | // Read command terminator, start reply 121 | verifySpace(); 122 | 123 | // If only a partial page is to be programmed, the erase might not be complete. 124 | // So check that here 125 | boot_spm_busy_wait(); 126 | 127 | // Copy buffer into programming buffer 128 | bufPtr = buff; 129 | addrPtr = (uint16_t)(void*)address; 130 | ch = SPM_PAGESIZE / 2; 131 | do { 132 | uint16_t a; 133 | a = *bufPtr++; 134 | a |= (*bufPtr++) << 8; 135 | boot_page_fill((uint16_t)(void*)addrPtr, a); 136 | addrPtr += 2; 137 | } while(--ch); 138 | 139 | // Write from programming buffer 140 | boot_page_write((uint16_t)(void*)address); 141 | boot_spm_busy_wait(); 142 | 143 | #if defined(RWWSRE) 144 | // Reenable read access to flash 145 | boot_rww_enable(); 146 | #endif 147 | } 148 | /* Read memory block mode, length is big endian. */ 149 | else if(ch == STK_READ_PAGE) { 150 | // READ PAGE - we only read flash 151 | getch(); /* getlen() */ 152 | length = getch(); 153 | getch(); 154 | 155 | verifySpace(); 156 | 157 | #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560) || defined(__AVR_ATmega1284P__) 158 | // do putch(pgm_read_byte_near(address++)); 159 | // while (--length); 160 | do { 161 | uint8_t result; 162 | __asm__("elpm %0,Z\n":"=r"(result):"z"(address)); 163 | putch(result); 164 | address++; 165 | } while(--length); 166 | #else 167 | do putch(pgm_read_byte_near(address++)); 168 | while(--length); 169 | #endif 170 | } 171 | /* Get device signature bytes */ 172 | else if(ch == STK_READ_SIGN) { 173 | // READ SIGN - return what Avrdude wants to hear 174 | verifySpace(); 175 | putch(SIGNATURE_0); 176 | putch(SIGNATURE_1); 177 | putch(SIGNATURE_2); 178 | } else if(ch == STK_LEAVE_PROGMODE) { 179 | // Adaboot no-wait mod 180 | //watchdogConfig(WATCHDOG_16MS); 181 | verifySpace(); 182 | eeprom_write_byte(EEPROM_IMG_STAT, EEPROM_IMG_OK_VALUE); 183 | putch(STK_OK); 184 | return(0); 185 | } else { 186 | // This covers the response to commands like STK_ENTER_PROGMODE 187 | verifySpace(); 188 | } 189 | putch(STK_OK); 190 | return(1); 191 | } 192 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/optiboot.h: -------------------------------------------------------------------------------- 1 | #ifndef optiboot_h 2 | #define optiboot_h 3 | 4 | #if defined(__AVR_ATmega168__) 5 | #define RAMSTART (0x100) 6 | #define NRWWSTART (0x3800) 7 | #elif defined(__AVR_ATmega328P__) 8 | #define RAMSTART (0x100) 9 | #define NRWWSTART (0x7000) 10 | #elif defined (__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__) 11 | #define RAMSTART (0x100) 12 | #define NRWWSTART (0xE000) 13 | #elif defined(__AVR_ATtiny84__) 14 | #define RAMSTART (0x100) 15 | #define NRWWSTART (0x0000) 16 | #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) 17 | // #define RAMSTART (0x200) 18 | #define NRWWSTART (0xE000) 19 | #elif defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__) 20 | #define RAMSTART (0x100) 21 | #define NRWWSTART (0x1800) 22 | #endif 23 | 24 | /* This kind of define'd pointer to memory cause 25 | * the bootloader to hang during flashing 26 | * so it has been replaced with an uint8_t array of size 256 27 | * inside the programming phase 28 | */ 29 | //#define buff ((uint8_t*)(RAMSTART)) 30 | 31 | /* C zero initialises all global variables. However, that requires 32 | * These definitions are NOT zero initialised, but that doesn't matter 33 | * This allows us to drop the zero init code, saving us memory 34 | */ 35 | #ifdef VIRTUAL_BOOT_PARTITION 36 | #define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4)) 37 | #define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6)) 38 | #endif 39 | 40 | /* 41 | * Jump into the serial flashing subsystem 42 | */ 43 | uint8_t processOptiboot(void); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/optiboot_stk500.h: -------------------------------------------------------------------------------- 1 | /* STK500 constants list, from AVRDUDE */ 2 | #define STK_OK 0x10 3 | #define STK_FAILED 0x11 // Not used 4 | #define STK_UNKNOWN 0x12 // Not used 5 | #define STK_NODEVICE 0x13 // Not used 6 | #define STK_INSYNC 0x14 // ' ' 7 | #define STK_NOSYNC 0x15 // Not used 8 | #define ADC_CHANNEL_ERROR 0x16 // Not used 9 | #define ADC_MEASURE_OK 0x17 // Not used 10 | #define PWM_CHANNEL_ERROR 0x18 // Not used 11 | #define PWM_ADJUST_OK 0x19 // Not used 12 | #define CRC_EOP 0x20 // 'SPACE' 13 | #define STK_GET_SYNC 0x30 // '0' 14 | #define STK_GET_SIGN_ON 0x31 // '1' 15 | #define STK_SET_PARAMETER 0x40 // '@' 16 | #define STK_GET_PARAMETER 0x41 // 'A' 17 | #define STK_SET_DEVICE 0x42 // 'B' 18 | #define STK_SET_DEVICE_EXT 0x45 // 'E' 19 | #define STK_ENTER_PROGMODE 0x50 // 'P' 20 | #define STK_LEAVE_PROGMODE 0x51 // 'Q' 21 | #define STK_CHIP_ERASE 0x52 // 'R' 22 | #define STK_CHECK_AUTOINC 0x53 // 'S' 23 | #define STK_LOAD_ADDRESS 0x55 // 'U' 24 | #define STK_UNIVERSAL 0x56 // 'V' 25 | #define STK_PROG_FLASH 0x60 // '`' 26 | #define STK_PROG_DATA 0x61 // 'a' 27 | #define STK_PROG_FUSE 0x62 // 'b' 28 | #define STK_PROG_LOCK 0x63 // 'c' 29 | #define STK_PROG_PAGE 0x64 // 'd' 30 | #define STK_PROG_FUSE_EXT 0x65 // 'e' 31 | #define STK_READ_FLASH 0x70 // 'p' 32 | #define STK_READ_DATA 0x71 // 'q' 33 | #define STK_READ_FUSE 0x72 // 'r' 34 | #define STK_READ_LOCK 0x73 // 's' 35 | #define STK_READ_PAGE 0x74 // 't' 36 | #define STK_READ_SIGN 0x75 // 'u' 37 | #define STK_READ_OSCCAL 0x76 // 'v' 38 | #define STK_READ_FUSE_EXT 0x77 // 'w' 39 | #define STK_READ_OSCCAL_EXT 0x78 // 'x' 40 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/serial.c: -------------------------------------------------------------------------------- 1 | /* Name: serial.c 2 | * Author: . 3 | * Copyright: Stelios Tsampas with stuff from Arduino and optiboot 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: tftpboot 6 | * Function: UART support of optiboot and debugging 7 | * Version: 0.2 support for USB flashing 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "serial.h" 16 | #include "watchdog.h" 17 | #include "util.h" 18 | #if defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega1284P__) 19 | #include "optiboot.h" 20 | #elif defined(__AVR_ATmega2560__) 21 | #include "stk500boot.h" 22 | #else 23 | #error "Unknown MCU. Cannot find the proper serial bootloader." 24 | #endif 25 | 26 | 27 | 28 | void serialInit(void) 29 | { 30 | // Double speed mode USART0 31 | UART_STATUS_REG = _BV(UART_DOUBLE_SPEED); 32 | // Enable receiver and transiter on USART0 33 | UART_CONTROL_REG = _BV(UART_ENABLE_RECEIVER) | _BV(UART_ENABLE_TRANSMITTER); 34 | // Set 8bit character length on USART0 35 | UART_MODE_REG = _BV(UART_CHAR_SIZE_LOW) | _BV(UART_CHAR_SIZE_MID); 36 | // Set USART0 baud rate 37 | UART_BAUD_RATE_LOW = (uint8_t)((F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1); 38 | // Alternative way taken from stk500boot 39 | //UART_BAUD_RATE_LOW = UART_BAUD_SELECT(BAUDRATE, F_CPU); 40 | 41 | 42 | #if (DEBUG > 0) 43 | DDRD = 0x92; 44 | #endif 45 | 46 | } 47 | 48 | 49 | void putch(uint8_t c) 50 | { 51 | while(!(UART_STATUS_REG & _BV(UART_DATA_REG_EMPTY))); 52 | UART_DATA_REG = c; 53 | } 54 | 55 | 56 | void puthex(uint8_t c) 57 | { 58 | c &= 0xf; 59 | if(c > 9) c += 7; 60 | //while(!(UART_STATUS_REG & _BV(UART_DATA_REG_EMPTY))); 61 | //UART_DATA_REG = c + '0'; 62 | putch(c + '0'); 63 | } 64 | 65 | 66 | uint8_t getch(void) 67 | { 68 | //uint8_t ch; 69 | 70 | while(!(UART_STATUS_REG & _BV(UART_RECEIVE_COMPLETE))); 71 | if(!(UART_STATUS_REG & _BV(UART_FRAME_ERROR))) { 72 | /* 73 | * A Framing Error indicates (probably) that something is talking 74 | * to us at the wrong bit rate. Assume that this is because it 75 | * expects to be talking to the application, and DON'T reset the 76 | * watchdog. This should cause the bootloader to abort and run 77 | * the application "soon", if it keeps happening. (Note that we 78 | * don't care that an invalid char is returned...) 79 | */ 80 | wdt_reset(); 81 | } 82 | 83 | //ch = UART_DATA_REG; 84 | //return ch; 85 | 86 | return(UART_DATA_REG); 87 | } 88 | 89 | 90 | uint8_t serialPoll(void) 91 | { 92 | if(UART_STATUS_REG & _BV(UART_RECEIVE_COMPLETE)) { 93 | resetTick(); 94 | serialFlashing = TRUE; 95 | #if defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega1284P__) 96 | return(processOptiboot()); 97 | #elif defined(__AVR_ATmega2560__) 98 | return(processStk500boot()); 99 | #endif 100 | } 101 | return(1); 102 | } 103 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef serial_h 2 | #define serial_h 3 | 4 | /* 5 | * define CPU frequency in Mhz here if not defined in Makefile 6 | */ 7 | #ifndef F_CPU 8 | #define F_CPU 16000000UL 9 | #endif 10 | 11 | /* 12 | * UART Baudrate, AVRStudio AVRISP only accepts 115200 bps 13 | */ 14 | #ifndef BAUDRATE 15 | #define BAUDRATE 115200 16 | #endif 17 | 18 | /* 19 | * Enable (1) or disable (0) USART double speed operation 20 | */ 21 | #ifndef UART_BAUDRATE_DOUBLE_SPEED 22 | #if defined (__AVR_ATmega32__) 23 | #define UART_BAUDRATE_DOUBLE_SPEED 0 24 | #else 25 | #define UART_BAUDRATE_DOUBLE_SPEED 1 26 | #endif 27 | #endif 28 | 29 | /* 30 | * Macro to calculate UBBR from XTAL and baudrate 31 | */ 32 | #if defined(__AVR_ATmega32__) && UART_BAUDRATE_DOUBLE_SPEED 33 | #define UART_BAUD_SELECT(baudRate,xtalCpu) ((xtalCpu / 4 / baudRate - 1) / 2) 34 | #elif defined(__AVR_ATmega32__) 35 | #define UART_BAUD_SELECT(baudRate,xtalCpu) ((xtalCpu / 8 / baudRate - 1) / 2) 36 | #elif UART_BAUDRATE_DOUBLE_SPEED 37 | #define UART_BAUD_SELECT(baudRate,xtalCpu) (((float)(xtalCpu))/(((float)(baudRate))*8.0)-1.0+0.5) 38 | #else 39 | #define UART_BAUD_SELECT(baudRate,xtalCpu) (((float)(xtalCpu))/(((float)(baudRate))*16.0)-1.0+0.5) 40 | #endif 41 | 42 | 43 | /* set the UART baud rate defaults */ 44 | #ifndef BAUD_RATE 45 | #if F_CPU >= 8000000L 46 | #define BAUD_RATE 115200L // Highest rate Avrdude win32 will support 47 | #elif F_CPU >= 1000000L 48 | #define BAUD_RATE 9600L // 19200 also supported, but with significant error 49 | #elif F_CPU >= 128000L 50 | #define BAUD_RATE 4800L // Good for 128kHz internal RC 51 | #else 52 | #define BAUD_RATE 1200L // Good even at 32768Hz 53 | #endif 54 | #endif 55 | 56 | /* Switch in soft UART for hard baud rates */ 57 | #if (F_CPU/BAUD_RATE) > 280 // > 57600 for 16MHz 58 | #ifndef SOFT_UART 59 | #define SOFT_UART 60 | #endif 61 | #endif 62 | 63 | /* USART definitions */ 64 | #if defined(_BOARD_ROBOTX_) || defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) 65 | #define UART_BAUD_RATE_LOW UBRR1L 66 | #define UART_STATUS_REG UCSR1A 67 | #define UART_CONTROL_REG UCSR1B 68 | #define UART_ENABLE_TRANSMITTER TXEN1 69 | #define UART_ENABLE_RECEIVER RXEN1 70 | #define UART_TRANSMIT_COMPLETE TXC1 71 | #define UART_RECEIVE_COMPLETE RXC1 72 | #define UART_DATA_REG UDR1 73 | #define UART_DOUBLE_SPEED U2X1 74 | 75 | #elif defined(__AVR_ATmega8__) || defined(__AVR_ATmega16__) || defined(__AVR_ATmega32__) \ 76 | || defined(__AVR_ATmega8515__) || defined(__AVR_ATmega8535__) 77 | /* ATMega8 with one USART */ 78 | #define UART_BAUD_RATE_LOW UBRRL 79 | #define UART_STATUS_REG UCSRA 80 | #define UART_CONTROL_REG UCSRB 81 | #define UART_ENABLE_TRANSMITTER TXEN 82 | #define UART_ENABLE_RECEIVER RXEN 83 | #define UART_TRANSMIT_COMPLETE TXC 84 | #define UART_RECEIVE_COMPLETE RXC 85 | #define UART_DATA_REG UDR 86 | #define UART_DOUBLE_SPEED U2X 87 | 88 | #elif defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega162__) \ 89 | || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega1280__) \ 90 | || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) || defined(__AVR_ATmega1284P__) 91 | /* ATMega with two USART, use UART0 */ 92 | #define UART_BAUD_RATE_LOW UBRR0L 93 | #define UART_STATUS_REG UCSR0A 94 | #define UART_CONTROL_REG UCSR0B 95 | #define UART_MODE_REG UCSR0C 96 | #define UART_ENABLE_TRANSMITTER TXEN0 97 | #define UART_ENABLE_RECEIVER RXEN0 98 | #define UART_CHAR_SIZE_LOW UCSZ00 99 | #define UART_CHAR_SIZE_MID UCSZ01 100 | #define UART_TRANSMIT_COMPLETE TXC0 101 | #define UART_RECEIVE_COMPLETE RXC0 102 | #define UART_DATA_REG UDR0 103 | #define UART_DATA_REG_EMPTY UDRE0 104 | #define UART_DOUBLE_SPEED U2X0 105 | #define UART_FRAME_ERROR FE0 106 | 107 | #elif defined(UBRR0L) && defined(UCSR0A) && defined(TXEN0) 108 | /* ATMega with two USART, use UART0 */ 109 | #define UART_BAUD_RATE_LOW UBRR0L 110 | #define UART_STATUS_REG UCSR0A 111 | #define UART_CONTROL_REG UCSR0B 112 | #define UART_ENABLE_TRANSMITTER TXEN0 113 | #define UART_ENABLE_RECEIVER RXEN0 114 | #define UART_TRANSMIT_COMPLETE TXC0 115 | #define UART_RECEIVE_COMPLETE RXC0 116 | #define UART_DATA_REG UDR0 117 | #define UART_DOUBLE_SPEED U2X0 118 | 119 | #elif defined(UBRRL) && defined(UCSRA) && defined(UCSRB) && defined(TXEN) && defined(RXEN) 120 | //* catch all 121 | #define UART_BAUD_RATE_LOW UBRRL 122 | #define UART_STATUS_REG UCSRA 123 | #define UART_CONTROL_REG UCSRB 124 | #define UART_ENABLE_TRANSMITTER TXEN 125 | #define UART_ENABLE_RECEIVER RXEN 126 | #define UART_TRANSMIT_COMPLETE TXC 127 | #define UART_RECEIVE_COMPLETE RXC 128 | #define UART_DATA_REG UDR 129 | #define UART_DOUBLE_SPEED U2X 130 | 131 | #else 132 | #error "no UART definition for MCU available" 133 | 134 | #endif 135 | 136 | /* Serial status flag, it is set to TRUE if flashing from 137 | * serial is currently active */ 138 | uint8_t serialFlashing; 139 | 140 | /* 141 | * Function definitions 142 | */ 143 | void serialInit(void); 144 | 145 | void putch(uint8_t c); 146 | void puthex(uint8_t c); 147 | 148 | uint8_t getch(void); 149 | 150 | uint8_t serialPoll(void); 151 | #endif 152 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/spi.c: -------------------------------------------------------------------------------- 1 | /* Name: spi.c 2 | * Author: Stelios Tsampas 3 | * Copyright: Arduino 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: ariadne bootloader 6 | * Function: SPI functions 7 | * Version: 0.5 "Mega2560" 8 | */ 9 | 10 | #include 11 | 12 | #include "spi.h" 13 | #include "debug.h" 14 | #include "debug_spi.h" 15 | 16 | /** Send uint8_t to Ethernet controller */ 17 | void spiWriteReg(uint16_t address, uint8_t cb, uint8_t value) 18 | { 19 | DBG_SPI_EX( 20 | tracePGMlnSpi(mDebugSpi_NWREG); 21 | tracenum(address); 22 | tracePGM(mDebugSpi_COMMA); 23 | tracenum(value); 24 | ) 25 | 26 | SPCR = _BV(SPE) | _BV(MSTR); // Set SPI as master 27 | SS_LOW(); 28 | 29 | #if defined(__WIZ_W5100__) 30 | SPDR = SPI_WRITE; 31 | while(!(SPSR & _BV(SPIF))); 32 | #endif 33 | 34 | SPDR = address >> 8; 35 | while(!(SPSR & _BV(SPIF))); 36 | 37 | SPDR = address & 0xff; 38 | while(!(SPSR & _BV(SPIF))); 39 | 40 | #if defined(__WIZ_W5200__) 41 | SPDR = 0x80; 42 | while(!(SPSR & _BV(SPIF))); 43 | 44 | SPDR = 0x01; 45 | while(!(SPSR & _BV(SPIF))); 46 | #endif 47 | #if defined(__WIZ_W5500__) 48 | SPDR = cb; //Socket 3 BSB Write 0x6D Selects Socket 3 Register, write mode, 1 byte data length 49 | while(!(SPSR & _BV(SPIF))); 50 | #endif 51 | 52 | SPDR = value; 53 | while(!(SPSR & _BV(SPIF))); 54 | 55 | SS_HIGH(); 56 | cb = 0; //prevents compiler whining about unused cb variable 57 | SPCR = cb; // Turn off SPI 58 | } 59 | 60 | void spiWriteWord(uint16_t address, uint8_t cb, uint16_t value) 61 | { 62 | // Write uint16_t to Ethernet controller 63 | spiWriteReg(address++, cb, value >> 8); 64 | spiWriteReg(address, cb, value & 0xff); 65 | } 66 | 67 | /** Read uint8_t from Ethernet controller */ 68 | uint8_t spiReadReg(uint16_t address, uint8_t cb) 69 | { 70 | #if defined(SPAM_ME) 71 | DBG_SPI_EX( 72 | tracePGMlnSpi(mDebugSpi_NRREG); 73 | tracenum(address); 74 | ) 75 | #endif 76 | 77 | uint8_t returnValue; 78 | 79 | SPCR = _BV(SPE) | _BV(MSTR); 80 | SS_LOW(); 81 | 82 | #if defined(__WIZ_W5100__) 83 | SPDR = SPI_READ; 84 | while(!(SPSR & _BV(SPIF))); 85 | #endif 86 | 87 | SPDR = address >> 8; 88 | while(!(SPSR & _BV(SPIF))); 89 | 90 | SPDR = address & 0xff; 91 | while(!(SPSR & _BV(SPIF))); 92 | 93 | #if defined(__WIZ_W5200__) 94 | SPDR = 0x00; 95 | while(!(SPSR & _BV(SPIF))); 96 | 97 | SPDR = 0x01; 98 | while(!(SPSR & _BV(SPIF))); 99 | #endif 100 | #if defined(__WIZ_W5500__) 101 | SPDR = cb; //Socket 3 BSB Read 0x69 Selects Socket 3 Register, read mode, 1 byte data length 102 | while(!(SPSR & _BV(SPIF))); 103 | #endif 104 | 105 | SPDR = 0; 106 | while(!(SPSR & _BV(SPIF))); 107 | 108 | SS_HIGH(); 109 | returnValue = SPDR; 110 | 111 | cb = 0; //prevents compiler whining about unused cb variable 112 | SPCR = cb; // Turn off SPI 113 | 114 | return(returnValue); 115 | } 116 | 117 | uint16_t spiReadWord(uint16_t address, uint8_t cb) 118 | { 119 | // Read uint16_t from Ethernet controller 120 | return((spiReadReg(address, cb) << 8) | spiReadReg(address + 1, cb)); 121 | } 122 | 123 | void spiInit(void) 124 | { 125 | /** 126 | * Set up pins for SPI communication. 127 | * At this stage all pins are set to HIGH. This in fact DISABLES SPI for both Ethernet and SD. 128 | * SS pin for ethernet is pulled low just in time for reading or writing data inside those 129 | * functions. */ 130 | 131 | /** Set SPI pins high */ 132 | SPI_PORT = _BV(SCK) | _BV(MISO) | _BV(MOSI) | _BV(SS); 133 | /** Set SPI pins as output */ 134 | SPI_DDR = _BV(SCK) | _BV(MOSI) | _BV(SS); 135 | 136 | #if (ETH_SS != SS) 137 | /** Initialize extra SS pin used in some boards (mega) */ 138 | /** Set ethernet SS high */ 139 | ETH_PORT |= _BV(ETH_SS); 140 | /** Set ethernet SS as output */ 141 | ETH_DDR |= _BV(ETH_SS); 142 | #endif 143 | 144 | /** Disable SD card */ 145 | /** Set SD SS pin high */ 146 | SD_PORT |= _BV(SD_SS); 147 | /** Set SD SS pin as output */ 148 | SD_DDR |= _BV(SD_SS); 149 | 150 | #if (LED != SCK) 151 | /** Set up pins to flash the onboard led */ 152 | /** Set led pin to high */ 153 | LED_PORT |= _BV(LED); 154 | /** Set led pin as output */ 155 | LED_DDR |= _BV(LED); 156 | #endif 157 | 158 | /** Set up SPI 159 | ** Set the Double SPI Speed Bit */ 160 | SPSR = (1 << SPI2X); 161 | 162 | DBG_SPI(tracePGMlnSpi(mDebugSpi_DONE);) 163 | } 164 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/spi.h: -------------------------------------------------------------------------------- 1 | #ifndef spi_h 2 | #define spi_h 3 | 4 | /** Pin definitions for SPI and leds */ 5 | /** Uno and Deumilanove */ 6 | #if defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__) 7 | /** SPI port and pins */ 8 | #define SPI_DDR DDRB 9 | #define SPI_PORT PORTB 10 | #define SCK PINB5 //Pin 13 11 | #define MISO PINB4 //Pin 12 12 | #define MOSI PINB3 //Pin 11 13 | #define SS PINB2 //Pin 10 14 | /** Ethernet Shield SS pin */ 15 | #define ETH_DDR DDRB 16 | #define ETH_PORT PORTB 17 | #define ETH_SS PINB2 //Pin 10 18 | /** SD card SS pin */ 19 | #define SD_DDR DDRD 20 | #define SD_PORT PORTD 21 | #define SD_SS PIND4 //Pin 04 22 | /** Onboard LED is connected to pin PB5 in Duemilanove and Uno or to PB1 in Ethernet */ 23 | #define LED_DDR DDRB 24 | #define LED_PORT PORTB 25 | #if defined(ARDUINO_ETHERNET) 26 | #define LED PINB1 //Pin 9 27 | #else 28 | #define LED PINB5 //Pin 13 29 | #endif 30 | 31 | /** Mega1280 and Mega2560 */ 32 | #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) 33 | /** SPI port and pins */ 34 | #define SPI_DDR DDRB 35 | #define SPI_PORT PORTB 36 | #define SCK PINB1 //Pin 52 37 | #define MISO PINB3 //Pin 50 38 | #define MOSI PINB2 //Pin 51 39 | #define SS PINB0 //Pin 53 40 | /** Ethernet Shield SS pin */ 41 | #define ETH_DDR DDRB 42 | #define ETH_PORT PORTB 43 | #define ETH_SS PINB4 //Pin 10 44 | /** SD card SS pin */ 45 | #define SD_DDR DDRG 46 | #define SD_PORT PORTG 47 | #define SD_SS PING5 //Pin 04 48 | /** Onboard LED is connected to pin PB7 on Arduino Mega */ 49 | #define LED_DDR DDRB 50 | #define LED_PORT PORTB 51 | #define LED PINB7 52 | 53 | /** Mega1284P */ 54 | #elif defined(__AVR_ATmega1284P__) 55 | /** SPI port and pins */ 56 | #define SPI_DDR DDRB 57 | #define SPI_PORT PORTB 58 | #define SCK PINB7 //Pin 8 59 | #define MISO PINB6 //Pin 7 60 | #define MOSI PINB5 //Pin 6 61 | #define SS PINB4 //Pin 5 62 | /** Ethernet Shield SS pin */ 63 | #define ETH_DDR DDRB 64 | #define ETH_PORT PORTB 65 | #define ETH_SS PINB4 //Pin 5 66 | /** SD card SS pin */ 67 | #define SD_DDR DDRC 68 | #define SD_PORT PORTC 69 | #define SD_SS PINC7 //Pin 04 70 | /** Onboard RED LED is connected to pin PD7 on SEM 1284P board */ 71 | #define LED_DDR DDRD 72 | #define LED_PORT PORTD 73 | #define LED PIND7 74 | 75 | /** Leonardo */ 76 | #elif defined(__AVR_ATmega32U4__) 77 | #error "Leonardo not supported yet" 78 | #else 79 | #error "No pin definitions for MCU available" 80 | #endif 81 | 82 | #define SPI_WRITE (0xF0) 83 | #define SPI_READ (0x0F) 84 | 85 | #define SS_LOW() ETH_PORT &= ~_BV(ETH_SS) 86 | #define SS_HIGH() ETH_PORT |= _BV(ETH_SS) 87 | 88 | void spiInit(void); 89 | 90 | void spiWriteReg(uint16_t address, uint8_t cb, uint8_t value); 91 | void spiWriteWord(uint16_t address, uint8_t cb, uint16_t value); 92 | 93 | uint8_t spiReadReg(uint16_t address, uint8_t cb); 94 | uint16_t spiReadWord(uint16_t address, uint8_t cb); 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/stk500boot.h: -------------------------------------------------------------------------------- 1 | #ifndef stk500boot_h 2 | #define stk500boot_h 3 | 4 | //************************************************************************ 5 | //* these are used to test issues 6 | //* http://code.google.com/p/arduino/issues/detail?id=505 7 | //* Reported by mark.stubbs, Mar 14, 2011 8 | //* The STK500V2 bootloader is comparing the seqNum to 1 or the current sequence 9 | //* (IE: Requiring the sequence to be 1 or match seqNum before continuing). 10 | //* The correct behavior is for the STK500V2 to accept the PC's sequence number, and echo it back for the reply message. 11 | #define _FIX_ISSUE_505_ 12 | 13 | #ifndef EEWE 14 | #define EEWE 1 15 | #endif 16 | #ifndef EEMWE 17 | #define EEMWE 2 18 | #endif 19 | 20 | /* 21 | * HW and SW version, reported to AVRISP, must match version of AVRStudio 22 | */ 23 | #define CONFIG_PARAM_BUILD_NUMBER_LOW 0 24 | #define CONFIG_PARAM_BUILD_NUMBER_HIGH 0 25 | #define CONFIG_PARAM_HW_VER 0x0F 26 | #define CONFIG_PARAM_SW_MAJOR 2 27 | #define CONFIG_PARAM_SW_MINOR 0x0A 28 | 29 | /* 30 | * Calculate the address where the bootloader starts from FLASHEND and BOOTSIZE 31 | * (adjust BOOTSIZE below and BOOTLOADER_ADDRESS in Makefile if you want to change the size of the bootloader) 32 | */ 33 | //#define BOOTSIZE 1024 34 | #if (FLASHEND > 0x0F000) 35 | #define BOOTSIZE 8192 36 | #else 37 | #define BOOTSIZE 4096 38 | #endif 39 | 40 | #define APP_END (FLASHEND -(2*BOOTSIZE) + 1) 41 | 42 | /* 43 | * States used in the receive state machine 44 | */ 45 | #define ST_START 0 46 | #define ST_GET_SEQ_NUM 1 47 | #define ST_MSG_SIZE_1 2 48 | #define ST_MSG_SIZE_2 3 49 | #define ST_GET_TOKEN 4 50 | #define ST_GET_DATA 5 51 | #define ST_GET_CHECK 6 52 | #define ST_PROCESS 7 53 | 54 | 55 | uint8_t processStk500boot(void); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/stk500boot_command.h: -------------------------------------------------------------------------------- 1 | //**** ATMEL AVR - A P P L I C A T I O N N O T E ************************ 2 | //* 3 | //* Title: AVR068 - STK500 Communication Protocol 4 | //* Filename: command.h 5 | //* Version: 1.0 6 | //* Last updated: 31.01.2005 7 | //* 8 | //* Support E-mail: avr@atmel.com 9 | //* 10 | //************************************************************************** 11 | 12 | // *****************[ STK message constants ]*************************** 13 | 14 | #define MESSAGE_START 0x1B //= ESC = 27 decimal 15 | #define TOKEN 0x0E 16 | 17 | // *****************[ STK general command constants ]************************** 18 | 19 | #define CMD_SIGN_ON 0x01 20 | #define CMD_SET_PARAMETER 0x02 21 | #define CMD_GET_PARAMETER 0x03 22 | #define CMD_SET_DEVICE_PARAMETERS 0x04 23 | #define CMD_OSCCAL 0x05 24 | #define CMD_LOAD_ADDRESS 0x06 25 | #define CMD_FIRMWARE_UPGRADE 0x07 26 | 27 | 28 | // *****************[ STK ISP command constants ]****************************** 29 | 30 | #define CMD_ENTER_PROGMODE_ISP 0x10 31 | #define CMD_LEAVE_PROGMODE_ISP 0x11 32 | #define CMD_CHIP_ERASE_ISP 0x12 33 | #define CMD_PROGRAM_FLASH_ISP 0x13 34 | #define CMD_READ_FLASH_ISP 0x14 35 | #define CMD_PROGRAM_EEPROM_ISP 0x15 36 | #define CMD_READ_EEPROM_ISP 0x16 37 | #define CMD_PROGRAM_FUSE_ISP 0x17 38 | #define CMD_READ_FUSE_ISP 0x18 39 | #define CMD_PROGRAM_LOCK_ISP 0x19 40 | #define CMD_READ_LOCK_ISP 0x1A 41 | #define CMD_READ_SIGNATURE_ISP 0x1B 42 | #define CMD_READ_OSCCAL_ISP 0x1C 43 | #define CMD_SPI_MULTI 0x1D 44 | 45 | // *****************[ STK PP command constants ]******************************* 46 | 47 | #define CMD_ENTER_PROGMODE_PP 0x20 48 | #define CMD_LEAVE_PROGMODE_PP 0x21 49 | #define CMD_CHIP_ERASE_PP 0x22 50 | #define CMD_PROGRAM_FLASH_PP 0x23 51 | #define CMD_READ_FLASH_PP 0x24 52 | #define CMD_PROGRAM_EEPROM_PP 0x25 53 | #define CMD_READ_EEPROM_PP 0x26 54 | #define CMD_PROGRAM_FUSE_PP 0x27 55 | #define CMD_READ_FUSE_PP 0x28 56 | #define CMD_PROGRAM_LOCK_PP 0x29 57 | #define CMD_READ_LOCK_PP 0x2A 58 | #define CMD_READ_SIGNATURE_PP 0x2B 59 | #define CMD_READ_OSCCAL_PP 0x2C 60 | 61 | #define CMD_SET_CONTROL_STACK 0x2D 62 | 63 | // *****************[ STK HVSP command constants ]***************************** 64 | 65 | #define CMD_ENTER_PROGMODE_HVSP 0x30 66 | #define CMD_LEAVE_PROGMODE_HVSP 0x31 67 | #define CMD_CHIP_ERASE_HVSP 0x32 68 | #define CMD_PROGRAM_FLASH_HVSP 0x33 69 | #define CMD_READ_FLASH_HVSP 0x34 70 | #define CMD_PROGRAM_EEPROM_HVSP 0x35 71 | #define CMD_READ_EEPROM_HVSP 0x36 72 | #define CMD_PROGRAM_FUSE_HVSP 0x37 73 | #define CMD_READ_FUSE_HVSP 0x38 74 | #define CMD_PROGRAM_LOCK_HVSP 0x39 75 | #define CMD_READ_LOCK_HVSP 0x3A 76 | #define CMD_READ_SIGNATURE_HVSP 0x3B 77 | #define CMD_READ_OSCCAL_HVSP 0x3C 78 | 79 | // *****************[ STK status constants ]*************************** 80 | 81 | // Success 82 | #define STATUS_CMD_OK 0x00 83 | 84 | // Warnings 85 | #define STATUS_CMD_TOUT 0x80 86 | #define STATUS_RDY_BSY_TOUT 0x81 87 | #define STATUS_SET_PARAM_MISSING 0x82 88 | 89 | // Errors 90 | #define STATUS_CMD_FAILED 0xC0 91 | #define STATUS_CKSUM_ERROR 0xC1 92 | #define STATUS_CMD_UNKNOWN 0xC9 93 | 94 | // *****************[ STK parameter constants ]*************************** 95 | #define PARAM_BUILD_NUMBER_LOW 0x80 96 | #define PARAM_BUILD_NUMBER_HIGH 0x81 97 | #define PARAM_HW_VER 0x90 98 | #define PARAM_SW_MAJOR 0x91 99 | #define PARAM_SW_MINOR 0x92 100 | #define PARAM_VTARGET 0x94 101 | #define PARAM_VADJUST 0x95 102 | #define PARAM_OSC_PSCALE 0x96 103 | #define PARAM_OSC_CMATCH 0x97 104 | #define PARAM_SCK_DURATION 0x98 105 | #define PARAM_TOPCARD_DETECT 0x9A 106 | #define PARAM_STATUS 0x9C 107 | #define PARAM_DATA 0x9D 108 | #define PARAM_RESET_POLARITY 0x9E 109 | #define PARAM_CONTROLLER_INIT 0x9F 110 | 111 | // *****************[ STK answer constants ]*************************** 112 | 113 | #define ANSWER_CKSUM_ERROR 0xB0 114 | 115 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/tftp.h: -------------------------------------------------------------------------------- 1 | #ifndef tftp_h 2 | #define tftp_h 3 | 4 | /** TFTP port settings */ 5 | #define TFTP_PORT 69 6 | #define TFTP_DATA_PORT 46969 7 | /** Define this if you want random port generation */ 8 | //#define RANDOM_TFTP_DATA_PORT 9 | 10 | #define TFTP_OPCODE_UKN 0 11 | /** TFTP Opcode values from RFC 1350 */ 12 | #define TFTP_OPCODE_RRQ 1 13 | #define TFTP_OPCODE_WRQ 2 14 | #define TFTP_OPCODE_DATA 3 15 | #define TFTP_OPCODE_ACK 4 16 | #define TFTP_OPCODE_ERROR 5 17 | 18 | /** TFTP Error codes from RFC 1350 */ 19 | #define TFTP_ERROR_UNDEF 0 20 | #define TFTP_ERROR_NOT_FOUND 1 21 | #define TFTP_ERROR_ACCESS 2 22 | #define TFTP_ERROR_FULL 3 23 | #define TFTP_ERROR_ILLEGAL_OP 4 24 | #define TFTP_ERROR_UNKNOWN_XFER 4 25 | #define TFTP_ERROR_EXISTS 6 26 | #define TFTP_ERROR_NO_SUCH_USER 7 27 | 28 | /** TFTP message types */ 29 | #define ERROR_UNKNOWN 0 30 | #define ERROR_INVALID 1 31 | #define ACK 2 32 | #define ERROR_FULL 3 33 | #define FINAL_ACK 4 /// Like an ACK, but for the final data packet. Internal use only. 34 | #define INVALID_IMAGE 5 35 | 36 | 37 | #if defined(__AVR_ATmega328P__) 38 | #define MAX_ADDR 0x7000 /// For 328p with 2Kword bootloader 39 | #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1284P__) 40 | #define MAX_ADDR 0x1F000 /// For 1280 with 2Kword bootloader 41 | #elif defined(__AVR_ATmega2560__) 42 | #define MAX_ADDR 0x3F000 /// For 2560 with 2Kword bootloader 43 | #endif 44 | 45 | #define TFTP_DATA_SIZE 512 46 | #define UDP_HEADER_SIZE 8 47 | #define TFTP_OPCODE_SIZE 2 48 | #define TFTP_BLOCKNO_SIZE 2 49 | #define TFTP_MAX_PAYLOAD 512 50 | #define TFTP_PACKET_MAX_SIZE (UDP_HEADER_SIZE+TFTP_OPCODE_SIZE+\ 51 | TFTP_BLOCKNO_SIZE+TFTP_MAX_PAYLOAD) 52 | 53 | #define TFTP_PACKET_DELAY 400 54 | 55 | /** 56 | * Tftp status flag, it is set to TRUE if flashing from 57 | * tftp is currently active */ 58 | uint8_t tftpFlashing; 59 | 60 | #ifndef TFTP_RANDOM_PORT 61 | uint16_t tftpTransferPort; 62 | #endif 63 | 64 | void tftpInit(void); 65 | uint8_t tftpPoll(void); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/util.c: -------------------------------------------------------------------------------- 1 | /* Name: util.c 2 | * Author: Stelios Tsampas 3 | * Copyright: Arduino and optiboot 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: tftpboot 6 | * Function: Utility routines for various stuff 7 | * Version: 0.2 support for USB flashing 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "util.h" 16 | #include "spi.h" 17 | #include "debug.h" 18 | #include "debug_util.h" 19 | 20 | static uint16_t last_timer_1; 21 | static uint16_t tick = 0; 22 | 23 | 24 | void updateLed(void) 25 | { 26 | uint16_t next_timer_1 = TCNT1; 27 | 28 | if(next_timer_1 & 0x1000) LED_PORT ^= _BV(LED); // Led pin high 29 | else LED_PORT &= ~_BV(LED); // Led pin low 30 | 31 | if(next_timer_1 < last_timer_1) { 32 | tick++; 33 | DBG_UTIL( 34 | tracePGMlnUtil(mDebugUtil_TICK); 35 | tracenum(tick); 36 | tracePGMlnUtil(mDebugUtil_NEXT); 37 | tracenum(next_timer_1); 38 | tracePGMlnUtil(mDebugUtil_LAST); 39 | tracenum(last_timer_1); 40 | ) 41 | } 42 | 43 | last_timer_1 = next_timer_1; 44 | } 45 | 46 | void resetTick(void) 47 | { 48 | TCNT1 = 0; 49 | tick = 0; 50 | wdt_reset(); //Added so can use wdt 51 | } 52 | 53 | uint8_t timedOut(void) 54 | { 55 | // Never timeout if there is no code in Flash 56 | #if (FLASHEND > 0x10000) 57 | if(pgm_read_word_far(0x0000) == 0xFFFF) return(0); 58 | #else 59 | if(pgm_read_word_near(0x0000) == 0xFFFF) return(0); 60 | #endif 61 | 62 | if(tick > TIMEOUT) return(1); 63 | else return(0); 64 | } 65 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/util.h: -------------------------------------------------------------------------------- 1 | #ifndef util_h 2 | #define util_h 3 | 4 | #define TIMEOUT 9 5 | 6 | #ifndef LED_START_FLASHES 7 | #define LED_START_FLASHES 0 8 | #endif 9 | 10 | #define TRUE 1 11 | #define FALSE 0 12 | 13 | #define MAKESTR(a) #a 14 | #define MAKEVER(a, b) MAKESTR(a*256+b) 15 | 16 | /* FIXME: For some reason avr-gcc 4.7.1 decides that a ".word" has size of 4 17 | * and a ".byte" has size of 2 registers. For now this will stay like this 18 | * and change the -Wl,--section-start=.version=0x7ffe in the Makefile to 7ffc */ 19 | // asm(" .section .version\n" 20 | // "tftpboot_version: .word " MAKEVER(TFTPBOOT_MAJVER, TFTPBOOT_MINVER) "\n" 21 | // " .section .text\n"); 22 | 23 | /* 24 | * use 16bit address variable for ATmegas with <= 64K flash 25 | */ 26 | #if defined(RAMPZ) 27 | typedef uint32_t address_t; 28 | #else 29 | typedef uint16_t address_t; 30 | #endif 31 | 32 | #if (FLASHEND > 0x10000) 33 | #if defined(__AVR_ATmega2560__) 34 | #define PROGMEM_OFFSET 0x30000 35 | #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1284P__) 36 | #define PROGMEM_OFFSET 0x10000 37 | #else 38 | #error "Unknown MCU. Cannot define PROGMEM_OFFSET" 39 | #endif 40 | #endif 41 | 42 | void updateLed(void); 43 | void resetTick(void); 44 | uint8_t timedOut(void); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/validate.c: -------------------------------------------------------------------------------- 1 | /* Validate first sector is a genuine image */ 2 | 3 | #include 4 | 5 | #include "validate.h" 6 | #include "serial.h" 7 | #include "debug.h" 8 | #include "debug_vald.h" 9 | 10 | uint8_t validImage(uint8_t* base) 11 | { 12 | /* Check that a jump table is present in the first flash sector */ 13 | uint8_t i; 14 | for(i = 0; i < 0x34; i += 4) { 15 | 16 | // For each vector, check it is of the form: 17 | // 0x0C 0x94 0xWX 0xYZ ; JMP 0xWXYZ 18 | if(base[i] != 0x0c) { 19 | DBG_VALD( 20 | tracePGMlnVald(mDebugVald_FAILED); 21 | tracenum(i); 22 | tracePGM(mDebugVald_WITH); 23 | tracenum(base[i]); 24 | tracePGM(mDebugVald_0x0C); 25 | ) 26 | return(0); 27 | } 28 | 29 | if(base[i + 1] != 0x94) { 30 | DBG_VALD( 31 | tracePGMlnVald(mDebugVald_FAILED); 32 | tracenum(i + 1); 33 | tracePGM(mDebugVald_WITH); 34 | tracenum(base[i + 1]); 35 | tracePGM(mDebugVald_0x94); 36 | ) 37 | return(0); 38 | } 39 | } 40 | 41 | DBG_VALD(tracePGMlnVald(mDebugVald_VALID);) 42 | 43 | return(1); 44 | } 45 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/validate.h: -------------------------------------------------------------------------------- 1 | #ifndef validate_h 2 | #define validate_h 3 | 4 | uint8_t validImage(uint8_t* base); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/watchdog.c: -------------------------------------------------------------------------------- 1 | /* Name: watchdog.c 2 | * Author: Stelios Tsampas 3 | * Copyright: Stelios Tsampas 4 | * License: GPL http://www.gnu.org/licenses/gpl-2.0.html 5 | * Project: ethboot 6 | * Function: watchdog/reset handling 7 | * Version: 0.2 tftp / flashing functional 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | #include "watchdog.h" 14 | #include "debug.h" 15 | 16 | 17 | /* Disable the watchdog timer to prevent 18 | * eternal reset loop of doom and despair */ 19 | uint8_t watchdogDisable(void) 20 | { 21 | uint8_t mcusr_mirror; 22 | 23 | mcusr_mirror = MCUSR; 24 | MCUSR = 0; 25 | wdt_disable(); 26 | 27 | return(mcusr_mirror); 28 | } 29 | 30 | void watchdogReset(void) 31 | { 32 | wdt_reset(); 33 | } 34 | 35 | void watchdogConfig(uint8_t x) 36 | { 37 | WDTCSR = _BV(WDCE) | _BV(WDE); 38 | WDTCSR = x; 39 | } 40 | -------------------------------------------------------------------------------- /hardware/ariadne/bootloaders/ariadne/watchdog.h: -------------------------------------------------------------------------------- 1 | #ifndef watchdog_h 2 | #define watchdog_h 3 | 4 | /* Watchdog settings */ 5 | #define WATCHDOG_OFF (0) 6 | #define WATCHDOG_16MS (_BV(WDE)) 7 | #define WATCHDOG_32MS (_BV(WDP0) | _BV(WDE)) 8 | #define WATCHDOG_64MS (_BV(WDP1) | _BV(WDE)) 9 | #define WATCHDOG_125MS (_BV(WDP1) | _BV(WDP0) | _BV(WDE)) 10 | #define WATCHDOG_250MS (_BV(WDP2) | _BV(WDE)) 11 | #define WATCHDOG_500MS (_BV(WDP2) | _BV(WDP0) | _BV(WDE)) 12 | #define WATCHDOG_1S (_BV(WDP2) | _BV(WDP1) | _BV(WDE)) 13 | #define WATCHDOG_2S (_BV(WDP2) | _BV(WDP1) | _BV(WDP0) | _BV(WDE)) 14 | #ifndef __AVR_ATmega8__ 15 | #define WATCHDOG_4S (_BV(WDP3) | _BV(WDE)) 16 | #define WATCHDOG_8S (_BV(WDP3) | _BV(WDP0) | _BV(WDE)) 17 | #endif 18 | 19 | //void watchdogInit(void) __attribute__((naked)) __attribute__((section(".init3"))); 20 | uint8_t watchdogDisable(void); 21 | void watchdogReset(void); 22 | void watchdogConfig(uint8_t x); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /hardware/ariadne/programmers.txt: -------------------------------------------------------------------------------- 1 | avrdragon.name=AVR Dragon ISP 2 | avrdragon.communication=usb 3 | avrdragon.protocol=dragon_isp 4 | -------------------------------------------------------------------------------- /hardware/ariadne/variants/bobuino/pins_arduino.h: -------------------------------------------------------------------------------- 1 | #ifndef Pins_Arduino_h 2 | #define Pins_Arduino_h 3 | 4 | #include 5 | 6 | // ATMEL ATMEGA1284P on OSWIN (Bobuino pin layout) 7 | // 8 | // +---\/---+ 9 | // (D 4) PB0 1 | | 40 PA0 (D 21) AI 7 10 | // (D 5) PB1 2 | | 39 PA1 (D 20) AI 6 11 | // INT2 (D 6) PB2 3 | | 38 PA2 (D 19) AI 5 12 | // PWM (D 7) PB3 4 | | 37 PA3 (D 18) AI 4 13 | // PWM/SS (D 10) PB4 5 | | 36 PA4 (D 17) AI 3 14 | // MOSI (D 11) PB5 6 | | 35 PA5 (D 16) AI 2 15 | // PWM/MISO (D 12) PB6 7 | | 34 PA6 (D 15) AI 1 16 | // PWM/SCK (D 13) PB7 8 | | 33 PA7 (D 14) AI 0 17 | // RST 9 | | 32 AREF 18 | // VCC 10 | | 31 GND 19 | // GND 11 | | 30 AVCC 20 | // XTAL2 12 | | 29 PC7 (D 29) 21 | // XTAL1 13 | | 28 PC6 (D 28) 22 | // RX0 (D 0) PD0 14 | | 27 PC5 (D 27) TDI 23 | // TX0 (D 1) PD1 15 | | 26 PC4 (D 26) TDO 24 | // INT0 RX1 (D 2) PD2 16 | | 25 PC3 (D 25) TMS 25 | // INT1 TX1 (D 3) PD3 17 | | 24 PC2 (D 24) TCK 26 | // PWM (D 30) PD4 18 | | 23 PC1 (D 23) SDA 27 | // PWM (D 8) PD5 19 | | 22 PC0 (D 22) SCL 28 | // PWM (D 9) PD6 20 | | 21 PD7 (D 31) PWM 29 | // +--------+ 30 | // 31 | 32 | #define NUM_DIGITAL_PINS 32 33 | #define NUM_ANALOG_INPUTS 8 34 | #define analogInputToDigitalPin(p) ((p < NUM_ANALOG_INPUTS) ? 21 - (p) : -1) 35 | 36 | extern const uint8_t digital_pin_to_pcint[NUM_DIGITAL_PINS]; 37 | extern const uint16_t __pcmsk[]; 38 | //extern const uint8_t digital_pin_to_timer_PGM[NUM_DIGITAL_PINS]; 39 | 40 | #define ifpin(p,what,ifnot) (((p) >= 0 && (p) < NUM_DIGITAL_PINS) ? (what) : (ifnot)) 41 | #define digitalPinHasPWM(p) ifpin(p,pgm_read_byte(digital_pin_to_timer_PGM + (p)) != NOT_ON_TIMER,1==0) 42 | 43 | #define digitalPinToAnalogPin(p) ( (p) >= 14 && (p) <= 21 ? (p) - 14 : -1 ) 44 | //#define analogPinToChannel(p) ( (p) < NUM_ANALOG_INPUTS ? NUM_ANALOG_INPUTS - (p) : -1 ) 45 | #define analogPinToChannel(p) ( (p) < NUM_ANALOG_INPUTS ? (NUM_ANALOG_INPUTS-1) - (p) : -1 ) // Correct analogue pin numbering 46 | 47 | static const uint8_t SS = 10; 48 | static const uint8_t MOSI = 11; 49 | static const uint8_t MISO = 12; 50 | static const uint8_t SCK = 13; 51 | 52 | static const uint8_t SDA = 23; 53 | static const uint8_t SCL = 22; 54 | static const uint8_t LED_BUILTIN = 13; 55 | 56 | static const uint8_t A0 = 14; 57 | static const uint8_t A1 = 15; 58 | static const uint8_t A2 = 16; 59 | static const uint8_t A3 = 17; 60 | static const uint8_t A4 = 18; 61 | static const uint8_t A5 = 19; 62 | static const uint8_t A6 = 20; 63 | static const uint8_t A7 = 21; 64 | 65 | #define digitalPinToPCICR(p) ifpin(p,&PCICR,(uint8_t *)0) 66 | #define digitalPinToPCICRbit(p) ifpin(p,digital_pin_to_pcint[p] >> 3,(uint8_t *)0) 67 | #define digitalPinToPCMSK(p) ifpin(p,__pcmsk[digital_pin_to_pcint[]],(uint8_t *)0) 68 | #define digitalPinToPCMSKbit(p) ifpin(p,digital_pin_to_pcint[p] & 0x7,(uint8_t *)0) 69 | 70 | #ifdef ARDUINO_MAIN 71 | 72 | #define PA 1 73 | #define PB 2 74 | #define PC 3 75 | #define PD 4 76 | 77 | const uint8_t digital_pin_to_pcint[NUM_DIGITAL_PINS] = 78 | { 79 | 24, // D0 PD0 80 | 25, // D1 PD1 81 | 26, // D2 PD2 82 | 27, // D3 PD3 83 | 8, // D4 PB0 84 | 9, // D5 PB1 85 | 10, // D6 PB2 86 | 11, // D7 PB3 87 | 29, // D8 PD5 88 | 30, // D9 PD6 89 | 12, // D10 PB4 90 | 13, // D11 PB5 91 | 14, // D12 PB6 92 | 15, // D13 PB7 93 | 7, // D14 PA7 94 | 6, // D15 PA6 95 | 5, // D16 PA5 96 | 4, // D17 PA4 97 | 3, // D18 PA3 98 | 2, // D19 PA2 99 | 1, // D20 PA1 100 | 0, // D21 PA0 101 | 16, // D22 PC0 102 | 17, // D23 PC1 103 | 18, // D24 PC2 104 | 19, // D25 PC3 105 | 20, // D26 PC4 106 | 21, // D27 PC5 107 | 22, // D28 PC6 108 | 23, // D29 PC7 109 | 28, // D30 PD4 110 | 31, // D31 PD7 111 | }; 112 | 113 | const uint16_t __pcmsk[] = 114 | { 115 | (uint16_t)&PCMSK0, 116 | (uint16_t)&PCMSK1, 117 | (uint16_t)&PCMSK2, 118 | (uint16_t)&PCMSK3 119 | }; 120 | 121 | // these arrays map port names (e.g. port B) to the 122 | // appropriate addresses for various functions (e.g. reading 123 | // and writing) 124 | const uint16_t PROGMEM port_to_mode_PGM[] = 125 | { 126 | NOT_A_PORT, 127 | (uint16_t) &DDRA, 128 | (uint16_t) &DDRB, 129 | (uint16_t) &DDRC, 130 | (uint16_t) &DDRD, 131 | }; 132 | 133 | const uint16_t PROGMEM port_to_output_PGM[] = 134 | { 135 | NOT_A_PORT, 136 | (uint16_t) &PORTA, 137 | (uint16_t) &PORTB, 138 | (uint16_t) &PORTC, 139 | (uint16_t) &PORTD, 140 | }; 141 | 142 | const uint16_t PROGMEM port_to_input_PGM[] = 143 | { 144 | NOT_A_PORT, 145 | (uint16_t) &PINA, 146 | (uint16_t) &PINB, 147 | (uint16_t) &PINC, 148 | (uint16_t) &PIND, 149 | }; 150 | 151 | const uint8_t PROGMEM digital_pin_to_port_PGM[NUM_DIGITAL_PINS] = 152 | { 153 | PD, // D0 154 | PD, // D1 155 | PD, // D2 156 | PD, // D3 157 | PB, // D4 158 | PB, // D5 159 | PB, // D6 160 | PB, // D7 161 | PD, // D8 162 | PD, // D9 163 | PB, // D10 164 | PB, // D11 165 | PB, // D12 166 | PB, // D13 167 | PA, // D14 168 | PA, // D15 169 | PA, // D16 170 | PA, // D17 171 | PA, // D18 172 | PA, // D19 173 | PA, // D20 174 | PA, // D21 175 | PC, // D22 176 | PC, // D23 177 | PC, // D24 178 | PC, // D25 179 | PC, // D26 180 | PC, // D27 181 | PC, // D28 182 | PC, // D29 183 | PD, // D30 184 | PD, // D31 185 | }; 186 | 187 | const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[NUM_DIGITAL_PINS] = 188 | { 189 | _BV(0), // D0 PD0 190 | _BV(1), // D1 PD1 191 | _BV(2), // D2 PD2 192 | _BV(3), // D3 PD3 193 | _BV(0), // D4 PB0 194 | _BV(1), // D5 PB1 195 | _BV(2), // D6 PB2 196 | _BV(3), // D7 PB3 197 | _BV(5), // D8 PD5 198 | _BV(6), // D9 PD6 199 | _BV(4), // D10 PB4 200 | _BV(5), // D11 PB5 201 | _BV(6), // D12 PB6 202 | _BV(7), // D13 PB7 203 | _BV(7), // D14 PA7 204 | _BV(6), // D15 PA6 205 | _BV(5), // D16 PA5 206 | _BV(4), // D17 PA4 207 | _BV(3), // D18 PA3 208 | _BV(2), // D19 PA2 209 | _BV(1), // D20 PA1 210 | _BV(0), // D21 PA0 211 | _BV(0), // D22 PC0 212 | _BV(1), // D23 PC1 213 | _BV(2), // D24 PC2 214 | _BV(3), // D25 PC3 215 | _BV(4), // D26 PC4 216 | _BV(5), // D27 PC5 217 | _BV(6), // D28 PC6 218 | _BV(7), // D29 PC7 219 | _BV(4), // D30 PD4 220 | _BV(7), // D31 PD7 221 | }; 222 | 223 | const uint8_t PROGMEM digital_pin_to_timer_PGM[NUM_DIGITAL_PINS] = 224 | { 225 | NOT_ON_TIMER, // D0 PD0 226 | NOT_ON_TIMER, // D1 PD1 227 | NOT_ON_TIMER, // D2 PD2 228 | NOT_ON_TIMER, // D3 PD3 229 | NOT_ON_TIMER, // D4 PB0 230 | NOT_ON_TIMER, // D5 PB1 231 | NOT_ON_TIMER, // D6 PB2 232 | TIMER0A, // D7 PB3 233 | TIMER1A, // D8 PD5 234 | TIMER2B, // D9 PD6 235 | TIMER0B, // D10 PB4 236 | NOT_ON_TIMER, // D11 PB5 237 | TIMER3A, // D12 PB6 238 | TIMER3B, // D13 PB7 239 | NOT_ON_TIMER, // D14 PA0 240 | NOT_ON_TIMER, // D15 PA1 241 | NOT_ON_TIMER, // D16 PA2 242 | NOT_ON_TIMER, // D17 PA3 243 | NOT_ON_TIMER, // D18 PA4 244 | NOT_ON_TIMER, // D19 PA5 245 | NOT_ON_TIMER, // D20 PA6 246 | NOT_ON_TIMER, // D21 PA7 247 | NOT_ON_TIMER, // D22 PC0 248 | NOT_ON_TIMER, // D23 PC1 249 | NOT_ON_TIMER, // D24 PC2 250 | NOT_ON_TIMER, // D25 PC3 251 | NOT_ON_TIMER, // D26 PC4 252 | NOT_ON_TIMER, // D27 PC5 253 | NOT_ON_TIMER, // D28 PC6 254 | NOT_ON_TIMER, // D29 PC7 255 | TIMER1B, // D30 PD4 256 | TIMER2A, // D31 PD7 257 | }; 258 | 259 | #endif // ARDUINO_MAIN 260 | 261 | #endif // Pins_Arduino_h 262 | // vim:ai:cin:sts=2 sw=2 ft=cpp 263 | -------------------------------------------------------------------------------- /java-client/Recv.java: -------------------------------------------------------------------------------- 1 | import java.io.IOException; 2 | import java.net.DatagramPacket; 3 | import java.net.DatagramSocket; 4 | import java.net.SocketException; 5 | 6 | public class Recv { 7 | 8 | public static void main(String[] args) { 9 | if(args.length != 1) { 10 | System.out.println("Please specify receive port"); 11 | System.out.println("Recv "); 12 | System.exit(1); 13 | } 14 | int port = Integer.parseInt(args[0]); 15 | recv(port); 16 | } 17 | 18 | public static void recv(int port) { 19 | try { 20 | byte[] buf = new byte[256]; 21 | DatagramSocket socket = new DatagramSocket(port); 22 | DatagramPacket pack = new DatagramPacket(buf, buf.length); 23 | System.out.println("Listening on UDP port 5555."); 24 | System.out.println("Waiting for packets..."); 25 | socket.receive(pack); 26 | 27 | // display response 28 | String received = new String(pack.getData(), 0, pack.getLength()); 29 | System.out.println("Received: " + received); 30 | socket.close(); 31 | } catch(SocketException e) { 32 | e.printStackTrace(); 33 | } catch(IOException e) { 34 | e.printStackTrace(); 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /java-client/Send.java: -------------------------------------------------------------------------------- 1 | import java.io.IOException; 2 | import java.net.DatagramPacket; 3 | import java.net.DatagramSocket; 4 | import java.net.InetAddress; 5 | import java.net.SocketException; 6 | import java.net.UnknownHostException; 7 | 8 | public class Send { 9 | 10 | public static void main(String[] args) { 11 | if(args.length != 2) { 12 | System.out.println("Please specify send address and port"); 13 | System.out.println("Send "); 14 | System.exit(1); 15 | } 16 | try { 17 | InetAddress address = InetAddress.getByName(args[0]); 18 | int port = Integer.parseInt(args[1]); 19 | send(address, port); 20 | } catch(UnknownHostException e) { 21 | e.printStackTrace(); 22 | } 23 | } 24 | 25 | public static void send(InetAddress _addr, int _port) { 26 | 27 | try { 28 | byte[] magic = { 'a', 'r', 'd', 'u', 'i', 'n', 'o' }; 29 | DatagramPacket packet; 30 | packet = new DatagramPacket(magic, magic.length, _addr, _port); 31 | 32 | DatagramSocket socket = new DatagramSocket(); 33 | socket.send(packet); 34 | socket.close(); 35 | System.out.println("Packet sent."); 36 | } catch(SocketException e) { 37 | e.printStackTrace(); 38 | } catch(IOException e) { 39 | e.printStackTrace(); 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /libraries/EthernetReset/EthernetReset.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * EthernetReset.cpp - Ariadne Bootloader Reset Server library 3 | * Copyright (c) 2012 Stylianos Tsampas. All right reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "EthernetReset.h" 21 | 22 | /****************************************************************************** 23 | * Definitions 24 | ******************************************************************************/ 25 | 26 | void EthernetReset::stdResponce(char* msg) 27 | { 28 | _client.println("HTTP/1.1 200 OK"); 29 | _client.println("Content-Type: text/html"); 30 | _client.println("Connnection: close"); 31 | _client.println(); 32 | _client.println(""); 33 | _client.println(""); 34 | _client.println(msg); 35 | _client.println(""); 36 | } 37 | 38 | void EthernetReset::watchdogReset() 39 | { 40 | delay(10); 41 | _client.stop(); 42 | wdt_disable(); 43 | wdt_enable(WDTO_2S); 44 | while(1); 45 | } 46 | 47 | /****************************************************************************** 48 | * Constructors / Destructors 49 | ******************************************************************************/ 50 | EthernetReset::EthernetReset(int port) 51 | { 52 | _server = new EthernetServer(port); 53 | String path = NetEEPROM.readPass(); 54 | path.toCharArray(_path, 20); 55 | } 56 | 57 | /****************************************************************************** 58 | * User API 59 | ******************************************************************************/ 60 | 61 | void EthernetReset::begin() 62 | { 63 | if(NetEEPROM.netSigIsSet()) { 64 | Ethernet.begin(NetEEPROM.readMAC(), NetEEPROM.readIP(), NetEEPROM.readGW(), 65 | NetEEPROM.readGW(), NetEEPROM.readSN()); 66 | 67 | _server->begin(); 68 | DBG( 69 | Serial.print("Server is at "); 70 | Serial.println(Ethernet.localIP()); 71 | Serial.print("Gw at "); 72 | Serial.println(NetEEPROM.readGW()); 73 | Serial.print("Password: "); 74 | Serial.println(_path);) 75 | } 76 | } 77 | 78 | void EthernetReset::check() 79 | { 80 | /* 25 is the the maximum command lenth plus 81 | * the standart GET and HTTP prefix and postfix */ 82 | char http_req[strlen(_path) + 25]; 83 | _client = _server->available(); 84 | if(_client) { 85 | DBG(Serial.println("new reset client");) 86 | while(_client.connected()) { 87 | if(_client.available()) { 88 | char c; 89 | char* url = http_req; 90 | while(( c = _client.read()) != '\n'){ 91 | *url = c; 92 | url++; 93 | } 94 | DBG(*url = '\0';) 95 | url = http_req + 5; 96 | _client.flush(); 97 | DBG(Serial.println(url);) 98 | if(!strncmp(url, _path,strlen(_path))) { 99 | url += (strlen(_path) + 1); 100 | if(!strncmp(url, "reset", 5)) { 101 | stdResponce("Arduino will be doing a normal reset in 2 seconds"); 102 | watchdogReset(); 103 | } else if(!strncmp(url,"reprogram", 9)) { 104 | stdResponce("Arduino will reset for reprogramming in 2 seconds"); 105 | NetEEPROM.writeImgBad(); 106 | watchdogReset(); 107 | } else stdResponce("Wrong command"); 108 | } else stdResponce("Wrong path"); 109 | break; 110 | } 111 | } 112 | delay(10); 113 | _client.stop(); 114 | DBG(Serial.println("reset client disonnected");) 115 | } 116 | } -------------------------------------------------------------------------------- /libraries/EthernetReset/EthernetReset.h: -------------------------------------------------------------------------------- 1 | #ifndef EthernetReset_h 2 | #define EthernetReset_h 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #define pgm_uchar(name) static const prog_uchar name[] PROGMEM 16 | 17 | #define ETHERNETRESET_DEBUG 0 18 | #ifdef ETHERNETRESET_DEBUG > 0 19 | #define DBG(c) c 20 | #else 21 | #define DBG(c) 22 | #endif 23 | 24 | class EthernetReset 25 | { 26 | private: 27 | EthernetServer* _server; 28 | EthernetClient _client; 29 | char _path[20]; 30 | 31 | void stdResponce(char* msg); 32 | void watchdogReset(); 33 | void stop(void); 34 | 35 | public: 36 | EthernetReset(int port); 37 | //~EthernetReset(); 38 | 39 | void begin(void); 40 | void check(void); 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /libraries/EthernetReset/examples/ResetServer/ResetServer.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Reset Web Server 3 | 4 | A simple sketch that creates 2 web servers on Arduino. The first one on port 80 is used 5 | for showing the values of the analog pins and it is the standard example found in the Arduino 6 | wiki. The second one run on the same port the Ariadne bootloader uses for uploading the sketch 7 | to the Arduino, in this case the standard 46969. This server is used for remote resetting and 8 | reprogramming thourgh a GET request to specific URLs. 9 | * http://{ip}/{reset_path}/reset 10 | * http://{ip}/{reset_path}/reprogram 11 | The first on will do a normal reset and after the bootloader times out the existing sketch 12 | will be ran. The second one will invalidate the existing sketch so the bootloader won't time out. 13 | {reset_path} is used instead of a password. If the path is correct you can access the commands 14 | "reset" and "reprogram". That is why you should pay extra attention to not let that path in your 15 | sketch if want to show it to the world. This is not as secure as a username and a password but 16 | it is more space efficient. 17 | 18 | Circuit: 19 | * Ethernet shield attached to pins 10, 11, 12, 13 20 | * Analog inputs attached to pins A0 through A5 (optional) 21 | 22 | created 14 Sep 2012 23 | by Stelios Tsampas 24 | 25 | */ 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | /* Create the reset server. This way your reser server will be at the port you 34 | * have speciefied in the bootloader for remote uploading. For more information on that 35 | * look at the "NetEEPROM" library in the "WriteNetworkSettings" sketch. 36 | * If you want to use your own port, create the object as this 37 | * "EthernetReset reset(reset_path, port);" where port is a number, i.e. 81 */ 38 | EthernetReset reset(8080); 39 | EthernetServer server(80); 40 | 41 | void setup() 42 | { 43 | // Open serial communications and wait for port to open: 44 | // This is for debugging. you can safely omit this line. 45 | Serial.begin(9600); 46 | /* For now the Arduino EthShield and the server are being configured using the 47 | * settings already stored in the EEPROM and are the same with the ones for Ariadne bootloader. 48 | * This means that you *MUST* have updated the network settings on your Arduino with the 49 | * "WriteNetworkSettings" sketch. 50 | * The "begin()" command takes care of everything, from initializing the EthShield to 51 | * starting the web server for resetting. This is why you should always start it before any other 52 | * server you might want to have */ 53 | reset.begin(); 54 | } 55 | 56 | 57 | void loop() 58 | { 59 | /* After the reset server is running the only thing needed is this command at the start of 60 | * the "loop()" function in your sketch and it will take care of checking for any reset or 61 | * reprogram requests */ 62 | reset.check(); 63 | 64 | } 65 | 66 | -------------------------------------------------------------------------------- /libraries/EthernetReset/keywords.txt: -------------------------------------------------------------------------------- 1 | EthernetReset KEYWORD1 2 | begin KEYWORD2 3 | check KEYWORD2 -------------------------------------------------------------------------------- /libraries/NetEEPROM/NetEEPROM.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * NetEEPROM.cpp - Ariadne Bootloader helper library 3 | * Copyright (c) 2012 Stylianos Tsampas. All right reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "NetEEPROM.h" 21 | #include "NetEEPROM_defs.h" 22 | 23 | 24 | /**************************************************** 25 | * Definitions * 26 | ****************************************************/ 27 | 28 | /* 29 | * Netowork functions 30 | */ 31 | void NetEEPROMClass::writeNetSig(void) 32 | { 33 | write(NETEEPROM_SIG_1, NETEEPROM_SIG_1_VALUE, 0); // Set signature 1 to load eeprom settings 34 | write(NETEEPROM_SIG_2, NETEEPROM_SIG_2_VALUE, 0); // Set signature 2 35 | } 36 | 37 | void NetEEPROMClass::writeAddr(IPAddress addr, byte start) 38 | { 39 | for(byte i = 0; i < 4; i++) write(i + start, addr[i], 0); 40 | } 41 | 42 | void NetEEPROMClass::writeIP(IPAddress ip) 43 | { 44 | writeAddr(ip, NETEEPROM_IP); 45 | } 46 | 47 | void NetEEPROMClass::writeGW(IPAddress gw) 48 | { 49 | writeAddr(gw, NETEEPROM_GW); 50 | } 51 | 52 | void NetEEPROMClass::writeSN(IPAddress sn) 53 | { 54 | writeAddr(sn, NETEEPROM_SN); 55 | } 56 | 57 | IPAddress NetEEPROMClass::readAddr(byte start) 58 | { 59 | byte octet[4]; 60 | for(byte i = 0; i < 4; i++) octet[i] = read(i, start); 61 | IPAddress Addr(octet); 62 | return(Addr); 63 | } 64 | 65 | /* 66 | * Port functions 67 | */ 68 | void NetEEPROMClass::writePortSig() 69 | { 70 | write(NETEEPROM_SIG_3, NETEEPROM_SIG_3_VALUE, 0); 71 | } 72 | 73 | /* 74 | * Password functions 75 | */ 76 | void NetEEPROMClass::writePassSig() 77 | { 78 | write(NETEEPROM_SIG_4, NETEEPROM_SIG_4_VALUE, 0); 79 | } 80 | 81 | 82 | 83 | /**************************************************** 84 | * User API * 85 | ****************************************************/ 86 | 87 | /* 88 | * Image status functions 89 | */ 90 | void NetEEPROMClass::writeImgBad(void) 91 | { 92 | write(NETEEPROM_IMG_STAT, NETEEPROM_IMG_BAD_VALUE, 0); // Image status set to invalid 93 | } 94 | 95 | void NetEEPROMClass::writeImgOk(void) 96 | { 97 | write(NETEEPROM_IMG_STAT, NETEEPROM_IMG_OK_VALUE, 0); // Image status set to valid 98 | } 99 | 100 | 101 | /* Netowork functions */ 102 | void NetEEPROMClass::eraseNetSig(void) 103 | { 104 | write(NETEEPROM_SIG_1, 0, 0); // Unset signature 1 to load built-in settings 105 | write(NETEEPROM_SIG_2, 0, 0); // Unset signature 2 106 | } 107 | 108 | void NetEEPROMClass::writeMAC(byte* mac) 109 | { 110 | for(byte i = 0; i < 6; i++) write(i + NETEEPROM_MAC, mac[i], 0); 111 | } 112 | 113 | void NetEEPROMClass::writeNet(byte* mac, IPAddress ip, IPAddress gw, IPAddress sn) 114 | { 115 | writeMAC(mac); 116 | writeIP(ip); 117 | writeGW(gw); 118 | writeSN(sn); 119 | 120 | writeNetSig(); 121 | } 122 | 123 | bool NetEEPROMClass::netSigIsSet(void) 124 | { 125 | if((read(NETEEPROM_SIG_1, 0) == NETEEPROM_SIG_1_VALUE) 126 | && (read(NETEEPROM_SIG_2, 0) == NETEEPROM_SIG_2_VALUE)) return(true); 127 | else return(false); 128 | } 129 | 130 | byte* NetEEPROMClass::readMAC(void) 131 | { 132 | byte default_mac[6] = {DEFAULT_MAC_ADDR}; 133 | byte* mac = (byte*)malloc(6 * sizeof(byte)); 134 | 135 | memcpy((void*)mac, (void*)default_mac, 6); 136 | 137 | if(netSigIsSet()) 138 | for(byte i = 0; i < 6; i++) mac[i] = read(i, NETEEPROM_MAC); 139 | 140 | return(mac); 141 | } 142 | 143 | IPAddress NetEEPROMClass::readIP(void) 144 | { 145 | IPAddress ip(DEFAULT_IP_ADDR); 146 | if(netSigIsSet()) ip = readAddr(NETEEPROM_IP); 147 | return ip; 148 | } 149 | 150 | IPAddress NetEEPROMClass::readGW(void) 151 | { 152 | IPAddress gw(DEFAULT_GW_ADDR); 153 | if(netSigIsSet()) gw = readAddr(NETEEPROM_GW); 154 | return(gw); 155 | } 156 | 157 | IPAddress NetEEPROMClass::readSN(void) 158 | { 159 | IPAddress sn(DEFAULT_SUB_MASK); 160 | if(netSigIsSet()) sn = readAddr(NETEEPROM_SN); 161 | return(sn); 162 | } 163 | 164 | void NetEEPROMClass::printNet(HardwareSerial* serial) 165 | { 166 | serial->println("--- Network Settings ---"); 167 | 168 | byte* mac = readMAC(); 169 | serial->print(" MAC: "); 170 | for(uint8_t i = 0; i < 6; i++) { 171 | serial->print("0x"); 172 | serial->print(mac[i], HEX); 173 | if(i != 5) serial->print("."); 174 | else serial->println(); 175 | } 176 | free(mac); 177 | 178 | serial->print("Address: "); 179 | serial->println(readIP()); 180 | 181 | serial->print("Gateway: "); 182 | serial->println(readGW()); 183 | 184 | serial->print(" Subnet: "); 185 | serial->println(readSN()); 186 | } 187 | 188 | /* 189 | * Port functions 190 | */ 191 | void NetEEPROMClass::erasePortSig(void) 192 | { 193 | write(NETEEPROM_SIG_3, 0, 0); 194 | } 195 | 196 | void NetEEPROMClass::writePort(word port) 197 | { 198 | write(NETEEPROM_PORT, (port & 0xFF), 0); 199 | write(NETEEPROM_PORT + 1, (port >> 8), 0); 200 | 201 | writePortSig(); 202 | } 203 | 204 | bool NetEEPROMClass::portSigIsSet(void) 205 | { 206 | if(read(NETEEPROM_SIG_3, 0) == NETEEPROM_SIG_3_VALUE) return(true); 207 | else return(false); 208 | } 209 | 210 | word NetEEPROMClass::readPort(void) 211 | { 212 | if(portSigIsSet()) { 213 | byte loByte = read(NETEEPROM_PORT, 0); 214 | byte hiByte = read(NETEEPROM_PORT + 1, 0); 215 | return(makeWord(hiByte, loByte)); 216 | } else return(46969); 217 | } 218 | 219 | void NetEEPROMClass::printPort(HardwareSerial* serial) 220 | { 221 | serial->println("--- Tftp Settings ---"); 222 | 223 | serial->print("Data Port: "); 224 | serial->println(readPort()); 225 | } 226 | 227 | /* 228 | * Password functions 229 | */ 230 | void NetEEPROMClass::erasePassSig(void) 231 | { 232 | write(NETEEPROM_SIG_4, 0, 0); 233 | } 234 | 235 | void NetEEPROMClass::writePass(String passwd) 236 | { 237 | uint8_t i; 238 | uint8_t pass_size = passwd.length(); 239 | 240 | if(pass_size > (NETEEPROM_END - NETEEPROM_PASS)) 241 | pass_size = NETEEPROM_END - NETEEPROM_PASS; 242 | 243 | for(i = 0; i < pass_size; i++) 244 | write(i, passwd.charAt(i), NETEEPROM_PASS); 245 | write(pass_size, '\0', NETEEPROM_PASS); 246 | 247 | writePassSig(); 248 | } 249 | 250 | bool NetEEPROMClass::passSigIsSet(void) 251 | { 252 | if(read(NETEEPROM_SIG_4, 0) == NETEEPROM_SIG_4_VALUE) return(true); 253 | else return(false); 254 | } 255 | 256 | String NetEEPROMClass::readPass(void) 257 | { 258 | String password; 259 | 260 | if(passSigIsSet()) { 261 | 262 | uint8_t c, i = 0; 263 | char passwd[NETEEPROM_END - NETEEPROM_PASS + 1]; 264 | 265 | while((c = read(i, NETEEPROM_PASS)) != '\0') passwd[i++] = c; 266 | passwd[i] = '\0'; 267 | 268 | password = passwd; 269 | 270 | } else password = "ariadne"; 271 | 272 | return password; 273 | } 274 | 275 | void NetEEPROMClass::printPass(HardwareSerial* serial) 276 | { 277 | serial->println("--- Reset Server Settings ---"); 278 | 279 | serial->print("Password: "); 280 | serial->println(readPass()); 281 | 282 | serial->print(" Length: "); 283 | serial->println(readPass().length()); 284 | } 285 | 286 | /* 287 | * General print function 288 | */ 289 | void NetEEPROMClass::print(HardwareSerial* serial) 290 | { 291 | if(netSigIsSet()) printNet(serial); 292 | if(portSigIsSet()) printPort(serial); 293 | if(passSigIsSet()) printPass(serial); 294 | } 295 | 296 | void NetEEPROMClass::printAll(HardwareSerial* serial) 297 | { 298 | printNet(serial); 299 | if(!netSigIsSet()) serial->println("(Defaults)"); 300 | 301 | printPort(serial); 302 | if(!portSigIsSet()) serial->println("(Default)"); 303 | 304 | printPass(serial); 305 | if(!passSigIsSet()) serial->println("(No password)"); 306 | } 307 | 308 | NetEEPROMClass NetEEPROM; 309 | -------------------------------------------------------------------------------- /libraries/NetEEPROM/NetEEPROM.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NetEEPROM.h - Ariadne Bootloader helper library 3 | * Copyright (c) 2012 Stylianos Tsampas. All right reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef NetEEPROM_h 21 | #define NetEEPROM_h 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #define pgm_uchar(name) static const unsigned char name[] PROGMEM 30 | 31 | #ifdef DEBUG 32 | #define DBG(c) c 33 | #else 34 | #define DBG(c) 35 | #endif 36 | 37 | class NetEEPROMClass : NewEEPROMClass { 38 | 39 | private: 40 | /* 41 | * Network functions 42 | */ 43 | /** Write signature bytes in eeprom, informing the bootloader that 44 | * the network settings will be loaded from the eeprom */ 45 | void writeNetSig(); 46 | /** Generic function to write IP addresses to EEPROM */ 47 | void writeAddr(IPAddress addr, byte start); 48 | /** Write MAC address to EEPROM. 49 | * @param mac pointer to byte array where the MAC address is stored. */ 50 | void writeMAC(byte* mac); 51 | /** Write IP to EEPROM. 52 | * @param ip IPAddress object with the IP to set for the Arduino. */ 53 | void writeIP(IPAddress ip); 54 | /** Write gateway to EEPROM. 55 | * @param gw IPAddress object with the IP of the Gateway. */ 56 | void writeGW(IPAddress gw); 57 | /** Write subnet mask to EEPROM. 58 | * @param sn IPAddress object with the Subnet Mask. */ 59 | void writeSN(IPAddress sn); 60 | /** Basic method to read addresses used in public functions */ 61 | IPAddress readAddr(byte start); 62 | 63 | /* 64 | * Port functions 65 | */ 66 | /** Write port signature byte to enable reading the TFTP data port from the bootloader */ 67 | void writePortSig(); 68 | 69 | /* 70 | * Password functions 71 | */ 72 | /** Write password signature to enable reading of password from EEPROM */ 73 | void writePassSig(); 74 | 75 | 76 | public: 77 | /** @name Image Status 78 | * Image status functions 79 | */ 80 | /** Set the flashed image status to bad, to prevent the bootloader 81 | * from timing out */ 82 | void writeImgBad(void); 83 | /** Set the flashed image status to good, to allow the bootloader 84 | * to load the program in memory */ 85 | void writeImgOk(void); 86 | 87 | 88 | /** @name Networking 89 | * Network functions 90 | */ 91 | /** Erase signature bytes in eeprom to revert the bootloader to 92 | * built-in networking settings */ 93 | void eraseNetSig(void); 94 | /** Write the full network settings to the EEPROM and set the network 95 | * settings signature in order to have the bootloader detect them. 96 | * @param mac pointer to byte array where the MAC address is stored. 97 | * @param ip IPAddress object with the IP to set for the Arduino. 98 | * @param gw IPAddress object with the IP of the Gateway. Needed even for local use. 99 | * @param sn IPAddress object with the Subnet Mask. */ 100 | void writeNet(byte* mac, IPAddress ip, IPAddress gw, IPAddress sn); 101 | /** Query if the bootloader uses the custom network settings. 102 | * @return True if network settings have been set in the EEPROM. */ 103 | bool netSigIsSet(void); 104 | /** Read the MAC address from EEPROM. 105 | * @return Pointer to allocated memory with the MAC address. */ 106 | byte* readMAC(void); 107 | /** Read IP. 108 | * @return IPAddress object with the IP of the Arduino. */ 109 | IPAddress readIP(void); 110 | /** Read Gateway 111 | * @return IPAddress object with the IP of the Gateway. */ 112 | IPAddress readGW(void); 113 | /** Read Subnet Mask 114 | * @return IPAddress object with the Subnet Mask. */ 115 | IPAddress readSN(void); 116 | /** Print the network settings. Serial needs to be initalized in the sketch 117 | * @param serial pointer to the initialized serial (use &Serial) */ 118 | void printNet(HardwareSerial* serial); 119 | 120 | 121 | 122 | /** @name Tftp 123 | * Port functions 124 | */ 125 | /** Erase port signature byte to disable reading the TFTP data port from the bootloader */ 126 | void erasePortSig(void); 127 | /** Write the port value to EEPROM. 128 | * @param port The number of the port to be used for the TFTP data transfer. */ 129 | void writePort(word port); 130 | /** Query if the port signature is set. 131 | * @return True if there is a port specified in EEPROM. */ 132 | bool portSigIsSet(void); 133 | /** Read the port from EEPROM */ 134 | word readPort(void); 135 | /** Print the port number to the serial. Serial needs to be initalized in the sketch 136 | * @param serial pointer to the initialized serial (use &Serial) */ 137 | void printPort(HardwareSerial* serial); 138 | 139 | 140 | 141 | /** @name Password 142 | * Password functions 143 | */ 144 | /** Erase password signature byte to disable password in the bootloader. 145 | * No default pass exists */ 146 | void erasePassSig(void); 147 | /** Write the password to the EEPROM. 148 | * @param passwd String object with the password to be stored. */ 149 | void writePass(String passwd); 150 | /** Query if the password is set. 151 | * @return True if the password has been set. */ 152 | bool passSigIsSet(void); 153 | /** Read the password from EEPROM 154 | * @return String object with the password. */ 155 | String readPass(void); 156 | /** Print password stored in EEPROM to serial. Serial has to be initalized in the sketch 157 | * @param serial pointer to the initialized serial (use &Serial) */ 158 | void printPass(HardwareSerial* serial); 159 | 160 | 161 | 162 | /** @name Generic 163 | * General purpose functions 164 | */ 165 | /** Print all set bootloader settings */ 166 | void print(HardwareSerial* serial); 167 | /** Print all bootloader settings. Printing defaults if unset */ 168 | void printAll(HardwareSerial* serial); 169 | }; 170 | 171 | extern NetEEPROMClass NetEEPROM; 172 | 173 | #endif 174 | // kate: indent-mode cstyle; indent-width 4; replace-tabs off; tab-width 4; 175 | -------------------------------------------------------------------------------- /libraries/NetEEPROM/NetEEPROM_defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NetEEPROM_defs.h - Ariadne Bootloader helper library 3 | * Copyright (c) 2012 Stylianos Tsampas. All right reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef NetEEPROM_defs_h 21 | #define NetEEPROM_defs_h 22 | 23 | /* EEPROM partitioning */ 24 | #define NETEEPROM_MAJVER 0 25 | #define NETEEPROM_MINVER 1 26 | #define NETEEPROM_IMG_STAT 2 27 | #define NETEEPROM_SIG_1 3 28 | #define NETEEPROM_SIG_2 4 29 | #define NETEEPROM_DATA 5 30 | #define NETEEPROM_GW 5 31 | #define NETEEPROM_SN 9 32 | #define NETEEPROM_MAC 13 33 | #define NETEEPROM_IP 19 34 | #define NETEEPROM_SIG_3 23 35 | #define NETEEPROM_PORT 24 36 | #define NETEEPROM_SIG_4 26 37 | #define NETEEPROM_PASS 27 38 | #define NETEEPROM_END 63 39 | 40 | #define EEPROM_SETTINGS_SIZE 18 41 | #define REGISTER_BLOCK_SIZE 28 42 | 43 | /* EEPROM values */ 44 | #define ARIADNE_MAJVER 0 45 | #define ARIADNE_MINVER 4 46 | 47 | #define NETEEPROM_IMG_OK_VALUE (0xEE) 48 | #define NETEEPROM_IMG_BAD_VALUE (0xFF) 49 | 50 | #define NETEEPROM_SIG_1_VALUE (0x55) 51 | #define NETEEPROM_SIG_2_VALUE (0xAA) 52 | #define NETEEPROM_SIG_3_VALUE (0xBB) 53 | #define NETEEPROM_SIG_4_VALUE (0xCC) 54 | 55 | #define DEFAULT_MAC_ADDR 0xDE,0xAD,0xBE,0xEF,0xFE,0xED 56 | #define DEFAULT_IP_ADDR 192,168,1,128 57 | #define DEFAULT_SUB_MASK 255,255,255,0 58 | #define DEFAULT_GW_ADDR 192,168,1,1 59 | 60 | 61 | #endif -------------------------------------------------------------------------------- /libraries/NetEEPROM/examples/ReadNetworkSettings/ReadNetworkSettings.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * ReadNetworkSettings 3 | * 4 | * 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | /* Preset for Arduino Ethernet. 11 | * For Arduino with Ethernet Shield set this to 13 */ 12 | int ledpin = 9; 13 | 14 | void setup() 15 | { 16 | // Initialize serial and wait for port to open: 17 | Serial.begin(9600); 18 | /* Wait for serial port to connect. Needed for Leonardo only 19 | * but breaks compilation on Arduino 1.0. Leonardo is not 20 | * supported by the bootloader yet */ 21 | //while(!Serial) { 22 | // ; 23 | //} 24 | 25 | /* Print the network settings to serial. Baud rate is 9600 */ 26 | NetEEPROM.printAll(&Serial); 27 | /* If you want to invalidate the image after first run, uncomment this 28 | * Because Duemilanove doesn't have auto-reset, don't uncomment this or 29 | * you will invalidate the image before you open the serial console */ 30 | //neteeprom.WriteImgBad(); 31 | pinMode(ledpin, OUTPUT); 32 | } 33 | 34 | void loop() 35 | { 36 | /* Blink an LED on pin defined above rapidly if present 37 | * to indicate the settings have been read in EEPROM. */ 38 | digitalWrite(ledpin, HIGH); 39 | delay(500); 40 | digitalWrite(ledpin, LOW); 41 | delay(500); 42 | } 43 | -------------------------------------------------------------------------------- /libraries/NetEEPROM/examples/WriteNetworkSettings/WriteNetworkSettings.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * WriteNetworkSettings 3 | 4 | This sketch writes a set of network configuration settings to EEPROM 5 | in such a way that both the Ariadne bootloader & a sketch 6 | can read them back later and share the same settings. 7 | 8 | As commented below these are the settings available for modification: 9 | 10 | * Gateway IP address 11 | * Subnet mask 12 | * MAC address 13 | * Arduino device IP address 14 | 15 | Once the settings have been written to EEPROM, an LED on pin 9 16 | (if connected) will flash rapdily. The arduino will reset after 4 seconds 17 | 18 | The default settings used by the bootloader: 19 | 20 | 192,168,1,254, // Gateway IP address 21 | 255,255,255,0, // Subnet mask 22 | 0xDE,0xAD,0xBE,0xEF,0xFE,0xED, // MAC address 23 | 192,168,1,128, // Arduino device IP address 24 | 25 | 26 | Settings suitable for link-local use: 27 | 28 | 169,254,1,1, // Gateway IP address 29 | 255,255,0,0, // Subnet mask 30 | 0x12,0x34,0x45,0x78,0x9A,0xBC, // MAC address 31 | 169,254,254,169, // Arduino device IP address 32 | 33 | */ 34 | 35 | #include 36 | #include 37 | #include 38 | 39 | /* You have to set each and every of these variables below to their correct values 40 | * for your network. The bootloader won't function correctly if one of these is wrong. 41 | * For the MAC Address, you can set it to anything you like, but using the one provided 42 | * with your Ethernet Shield or Arduino Ethernet is strongly suggested. */ 43 | byte mac[] = {0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC}; 44 | IPAddress ip(192, 168, 1, 120); 45 | IPAddress gateway(192, 168, 1, 1); 46 | IPAddress subnet(255, 255, 255, 0); 47 | /* You might want to also change the TFTP transfer port. If you have more than one arduinos 48 | * with ethernet behind your router that you want to program from outside your local 49 | * network you need a unique value for each one value. The initial negotiation of tftp still 50 | * happens at port [69]. You will also need to forwards these ports from your router. 51 | * The value set below is the built-in default [46969]. */ 52 | word port = 46970; 53 | /* This is the "password" for the reset server in case you want to reset your Arduino 54 | * remotely. This setting has no effect on the bootloader itself. Password can be 36 characters 55 | * long, at maximum. Any string longer than 36 characters will be truncated. 56 | * Spaces should not be used */ 57 | String password = "r4nd0m_p4ss"; 58 | 59 | /* Preset for Arduino Ethernet. 60 | * For Arduino with Ethernet Shield set this to 13 */ 61 | int ledpin = 9; 62 | 63 | void setup() 64 | { 65 | /* Write the new settings values to EEPROM */ 66 | NetEEPROM.writeNet(mac, ip, gateway, subnet); 67 | /* Set the TFTP data transfer port in EEPROM. Change it only if you need to */ 68 | //NetEEPROM.writePort(port); 69 | /* Write Reset Server password in EEPROM */ 70 | NetEEPROM.writePass(password); 71 | /* Set image status to bad, so upon reboot the bootloader won't load the previous sketch */ 72 | NetEEPROM.writeImgBad(); 73 | 74 | pinMode(ledpin, OUTPUT); 75 | /* Timeout and reset after 4 seconds */ 76 | wdt_enable(WDTO_4S); 77 | } 78 | 79 | 80 | void loop() 81 | { 82 | /* Blink an LED on pin defined above rapidly if present 83 | * to indicate the settings have been stored in EEPROM. */ 84 | digitalWrite(ledpin, HIGH); 85 | delay(500); 86 | digitalWrite(ledpin, LOW); 87 | delay(500); 88 | /* 1 Hz blinking continues until timer (which was started 89 | * in "setup") forces reset and this sketch then is invalid. */ 90 | } 91 | -------------------------------------------------------------------------------- /libraries/NetEEPROM/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For NetEEPROM 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | NetEEPROM KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | writeImgBad KEYWORD2 16 | writeImgOk KEYWORD2 17 | 18 | eraseNetSig KEYWORD2 19 | writeNet KEYWORD2 20 | netSigIsSet KEYWORD2 21 | readMAC KEYWORD2 22 | readIP KEYWORD2 23 | readGW KEYWORD2 24 | readSN KEYWORD2 25 | printNet KEYWORD2 26 | 27 | erasePortSig KEYWORD2 28 | writePort KEYWORD2 29 | portSigIsSet KEYWORD2 30 | readPort KEYWORD2 31 | printPort KEYWORD2 32 | 33 | erasePassSig KEYWORD2 34 | writePass KEYWORD2 35 | passSigIsSet KEYWORD2 36 | readPass KEYWORD2 37 | printPass KEYWORD2 38 | 39 | print KEYWORD2 40 | printAll KEYWORD2 41 | 42 | ###################################### 43 | # Constants (LITERAL1) 44 | ####################################### 45 | -------------------------------------------------------------------------------- /libraries/NetEEPROM/library.properties: -------------------------------------------------------------------------------- 1 | name=NetEEPROM(Ariadne-Bootloader) 2 | version=1.0.0 3 | author=Stylianos Tsampas 4 | maintainer= 5 | sentence=Set or display the network settings of the Ariadne bootloader. 6 | paragraph= 7 | category=Other 8 | url=https://github.com/codebendercc/Ariadne-Bootloader 9 | architectures=avr 10 | -------------------------------------------------------------------------------- /libraries/NewEEPROM/NewEEPROM.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | NewEEPROM.cpp - EEPROM library 3 | Copyright (c) 2006 David A. Mellis. All right reserved. 4 | 5 | Adapted for Ariadne Bootloader support by Stylianos Tsampas, 2012. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | /****************************************************************************** 23 | * Includes 24 | ******************************************************************************/ 25 | 26 | #include 27 | #include "Arduino.h" 28 | #include "NewEEPROM.h" 29 | 30 | /****************************************************************************** 31 | * Definitions 32 | ******************************************************************************/ 33 | 34 | uint8_t NewEEPROMClass::read(int address, uint8_t offset) 35 | { 36 | return eeprom_read_byte((unsigned char*) address + offset); 37 | } 38 | 39 | void NewEEPROMClass::write(int address, uint8_t value, uint8_t offset) 40 | { 41 | eeprom_write_byte((unsigned char*) address + offset, value); 42 | } 43 | 44 | /****************************************************************************** 45 | * Constructors 46 | ******************************************************************************/ 47 | 48 | NewEEPROMClass::NewEEPROMClass(void) 49 | { 50 | if(read(ARIADNE_SIGPOS, 0) == ARIADNE_SIGVAL) _offset = ARIADNE_OFFSET; 51 | else _offset = NO_OFFSET; 52 | } 53 | 54 | /****************************************************************************** 55 | * User API 56 | ******************************************************************************/ 57 | 58 | uint8_t NewEEPROMClass::read(int address) 59 | { 60 | return read(address, _offset); 61 | } 62 | 63 | void NewEEPROMClass::write(int address , uint8_t value) 64 | { 65 | write(address, value, _offset); 66 | } 67 | 68 | NewEEPROMClass EEPROM; 69 | // kate: indent-mode cstyle; indent-width 4; replace-tabs off; tab-width 4; 70 | -------------------------------------------------------------------------------- /libraries/NewEEPROM/NewEEPROM.h: -------------------------------------------------------------------------------- 1 | /* 2 | NewEEPROM.h - EEPROM library 3 | Copyright (c) 2006 David A. Mellis. All right reserved. 4 | 5 | Adapted for Ariadne Bootloader support be Stylianos Tsampas, 2012. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef NewEEPROM_h 23 | #define NewEEPROM_h 24 | 25 | #include 26 | 27 | #define ARIADNE_SIGPOS (0x02) 28 | #define ARIADNE_SIGVAL (0xEE) 29 | #define ARIADNE_OFFSET (0x40) 30 | #define NO_OFFSET (0x00) 31 | 32 | class NewEEPROMClass { 33 | 34 | private: 35 | uint8_t _offset; 36 | 37 | protected: 38 | uint8_t read(int, uint8_t); 39 | void write(int, uint8_t, uint8_t); 40 | 41 | public: 42 | NewEEPROMClass(void); 43 | uint8_t read(int); 44 | void write(int, uint8_t); 45 | }; 46 | 47 | extern NewEEPROMClass EEPROM; 48 | 49 | #endif 50 | 51 | // kate: indent-mode cstyle; indent-width 4; replace-tabs off; tab-width 4; 52 | -------------------------------------------------------------------------------- /libraries/NewEEPROM/examples/eeprom_clear/eeprom_clear.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Clear 3 | * 4 | * Sets all of the bytes of the EEPROM to 0. 5 | * This example code is in the public domain. 6 | 7 | */ 8 | 9 | #include 10 | 11 | void setup() 12 | { 13 | // write a 0 to all 512 bytes of the EEPROM 14 | for (int i = 0; i < 512; i++) 15 | EEPROM.write(i, 0); 16 | 17 | // turn the LED on when we're done 18 | digitalWrite(13, HIGH); 19 | } 20 | 21 | void loop() 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /libraries/NewEEPROM/examples/eeprom_read/eeprom_read.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Read 3 | * 4 | * Reads the value of each byte of the EEPROM and prints it 5 | * to the computer. 6 | * This example code is in the public domain. 7 | */ 8 | 9 | #include 10 | 11 | // start reading from the first byte (address 0) of the EEPROM 12 | int address = 0; 13 | byte value; 14 | 15 | void setup() 16 | { 17 | // initialize serial and wait for port to open: 18 | Serial.begin(9600); 19 | while (!Serial) { 20 | ; // wait for serial port to connect. Needed for Leonardo only 21 | } 22 | } 23 | 24 | void loop() 25 | { 26 | // read a byte from the current address of the EEPROM 27 | value = EEPROM.read(address); 28 | 29 | Serial.print(address); 30 | Serial.print("\t"); 31 | Serial.print(value, DEC); 32 | Serial.println(); 33 | 34 | // advance to the next address of the EEPROM 35 | address = address + 1; 36 | 37 | // there are only 512 bytes of EEPROM, from 0 to 511, so if we're 38 | // on address 512, wrap around to address 0 39 | if (address == 512) 40 | address = 0; 41 | 42 | delay(500); 43 | } 44 | -------------------------------------------------------------------------------- /libraries/NewEEPROM/examples/eeprom_write/eeprom_write.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Write 3 | * 4 | * Stores values read from analog input 0 into the EEPROM. 5 | * These values will stay in the EEPROM when the board is 6 | * turned off and may be retrieved later by another sketch. 7 | */ 8 | 9 | #include 10 | 11 | // the current address in the EEPROM (i.e. which byte 12 | // we're going to write to next) 13 | int addr = 0; 14 | 15 | void setup() 16 | { 17 | } 18 | 19 | void loop() 20 | { 21 | // need to divide by 4 because analog inputs range from 22 | // 0 to 1023 and each byte of the EEPROM can only hold a 23 | // value from 0 to 255. 24 | int val = analogRead(0) / 4; 25 | 26 | // write the value to the appropriate byte of the EEPROM. 27 | // these values will remain there when the board is 28 | // turned off. 29 | EEPROM.write(addr, val); 30 | 31 | // advance to the next address. there are 512 bytes in 32 | // the EEPROM, so go back to 0 when we hit 512. 33 | addr = addr + 1; 34 | if (addr == 512) 35 | addr = 0; 36 | 37 | delay(100); 38 | } 39 | -------------------------------------------------------------------------------- /libraries/NewEEPROM/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For NewEEPROM 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | NewEEPROM KEYWORD1 10 | EEPROM KEYWORD1 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | 16 | read KEYWORD2 17 | write KEYWORD2 18 | 19 | ####################################### 20 | # Constants (LITERAL1) 21 | ####################################### 22 | 23 | -------------------------------------------------------------------------------- /utilities/net-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | eth_dev="eth0" 3 | eth_ip="192.168.2.1" 4 | ard_ip="192.168.2.250" 5 | 6 | if [ "${1}" = "-s" ] 7 | then 8 | sudo ifconfig ${eth_dev} down 9 | sudo ifconfig ${eth_dev} ${eth_ip} netmask 255.255.255.0 10 | sudo route add ${ard_ip} gw ${eth_ip} dev ${eth_dev} 11 | 12 | echo "Network settings have been set" 13 | sleep 2 14 | ping -c4 ${ard_ip} 15 | 16 | elif [ "${1}" = "-u" ] 17 | then 18 | sudo ifcfg ${eth_dev} stop 19 | sudo ifconfig ${eth_dev} down 20 | echo "Network settings have been unset" 21 | 22 | else 23 | echo "Unknown option" 24 | echo "Use -s to set or -u to unset the network settings" 25 | fi 26 | -------------------------------------------------------------------------------- /utilities/tests/blink/atmega2560_blink13.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codebndr/Ariadne-Bootloader/19388fafb7b6dbcd34100a5a087f992525a08f8f/utilities/tests/blink/atmega2560_blink13.bin -------------------------------------------------------------------------------- /utilities/tests/blink/atmega328_blink13.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codebndr/Ariadne-Bootloader/19388fafb7b6dbcd34100a5a087f992525a08f8f/utilities/tests/blink/atmega328_blink13.bin -------------------------------------------------------------------------------- /utilities/tests/blink/atmega328_blink9.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codebndr/Ariadne-Bootloader/19388fafb7b6dbcd34100a5a087f992525a08f8f/utilities/tests/blink/atmega328_blink9.bin -------------------------------------------------------------------------------- /utilities/tests/fade/bigapp.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codebndr/Ariadne-Bootloader/19388fafb7b6dbcd34100a5a087f992525a08f8f/utilities/tests/fade/bigapp.bin -------------------------------------------------------------------------------- /utilities/tests/led_display/led_display.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codebndr/Ariadne-Bootloader/19388fafb7b6dbcd34100a5a087f992525a08f8f/utilities/tests/led_display/led_display.bin -------------------------------------------------------------------------------- /utilities/tests/led_display/led_display.hex: -------------------------------------------------------------------------------- 1 | :100000000C945D020C9485020C9485020C9485027C 2 | :100010000C9485020C9485020C9485020C94850244 3 | :100020000C9485020C9485020C9485020C94850234 4 | :100030000C9485020C9485020C9485020C94850224 5 | :100040000C94A0030C9485020C9485020C948502F8 6 | :100050000C9485020C9485020C9485020C94850204 7 | :100060000C9485020C948502000000000000000042 8 | :100070000000000000000000000000000000000080 9 | :100080000000000000000000000000000000000070 10 | :100090000000000000000000000000000000000060 11 | :1000A0000000000000000000000000000000000050 12 | :1000B0000000000000000000000000000000000040 13 | :1000C0000000000000000000000000000000000030 14 | :1000D0000000000000000000000000000000000020 15 | :1000E0000000000000000000000000000000000010 16 | :1000F0000000000000000000000000000000000000 17 | :1001000000000000000000000000000000000000EF 18 | :1001100000000000000000000000000000000000DF 19 | :1001200000000000000000000000000000000000CF 20 | :1001300000000000000000000000000000000000BF 21 | :1001400000000000000000000000000000000000AF 22 | :10015000000000000000000000000000000000009F 23 | :10016000000000000000000000000000000000008F 24 | :1001700010101010101000106C6C480000000000EF 25 | :1001800012247E24247E2448103C50381414781005 26 | :10019000626204081020464630484830504A443ACB 27 | :1001A0006060400000000000020408080808040223 28 | :1001B0004020101010102040000014083E081400C9 29 | :1001C000000008083E080800000000003030102041 30 | :1001D000000000003E000000000000000000303081 31 | :1001E00002020408102040403C6252524A4A463CF7 32 | :1001F000081808080808081C3C42020C1020407E21 33 | :100200003C42021C0202423C040C1424447E0404BE 34 | :100210007E40407C0202423C3C4240407C42423CA8 35 | :100220007E020408102020203C42423C4242423CD4 36 | :100230003C42423E0202423C00000030300030307E 37 | :1002400000003030003010200000040810080400C6 38 | :100250000000003E003E00000000100804081000EE 39 | :100260003C42020408080008003C425E525E403EE8 40 | :100270003C4242427E4242427C42427C4242427C7A 41 | :100280001C2240404040221C784442424242447872 42 | :100290007C4040784040407C7C404078404040403A 43 | :1002A0001C2240404E42221C4242427E4242424276 44 | :1002B00038101010101010380202020202024438E6 45 | :1002C0004448506060504844404040404040407C7A 46 | :1002D00042667E5A42424242626252524A4A46460E 47 | :1002E0003C4242424242423C7C4242427C4040408C 48 | :1002F0003C424242424A443A7C4242427C48444266 49 | :100300003C42403C0202423C7C1010101010101085 50 | :10031000424242424242423C444444442828101053 51 | :10032000424242425A5A6624424224181824424207 52 | :1003300044444428101010107E0204081020407E0F 53 | :100340000E0808080808080E4040201008040202A1 54 | :1003500070101010101010701028440000000000E1 55 | :10036000000000000000003E201008000000000017 56 | :1003700000000038043C243C00202020382424388D 57 | :10038000000000001C20201C000404041C24241C69 58 | :1003900000000018243C201C000814101038101015 59 | :1003A000001C24241C040438002020203824242489 60 | :1003B000000010003010103800080018080828103D 61 | :1003C000002020242830282400301010101010386D 62 | :1003D0000000000068545454000000003824242415 63 | :1003E000000000001824241800382424382020207D 64 | :1003F000001C24241C0404040000002834202020B5 65 | :100400000000001C201804380010103810101408C8 66 | :10041000000000002424241C000000004444281094 67 | :1004200000000000445454280000004428102844D0 68 | :10043000000024241C04043800003C040810203C64 69 | :10044000020404080404040200101010101010002C 70 | :100450004020201020202040000000324C000000EE 71 | :100460000000000000000000000000070002010082 72 | :100470000003040600000000000000000102040860 73 | :1004800010204080010204081020010204081020FE 74 | :10049000040404040404040402020202020203032A 75 | :1004A0000303030300000000250028002B000000C8 76 | :1004B0000000240027002A00950311241FBECFEF5F 77 | :1004C000D8E0DEBFCDBF11E0A0E0B1E0E6E4FAE0A5 78 | :1004D00002C005900D92A832B107D9F711E0A8E249 79 | :1004E000B1E001C01D92AF34B107E1F714E0CAEBEF 80 | :1004F000D4E004C02297FE010E941D05C83BD1072D 81 | :10050000C9F70E9488030C9421050C94000061E057 82 | :1005100089E00E94B10460E089E00E94D00461E0BB 83 | :1005200070E080E090E00E94260461E089E00E9493 84 | :10053000D00464E170E080E090E00E94260460E076 85 | :1005400089E00C94D00440914101E42FF0E0E050A8 86 | :10055000FF4F2081ABE2B1E080E090E058E0259FC2 87 | :1005600090011124FD0132971082FD013197108214 88 | :10057000FC01E20FF31FE859FF4FE491EC93019661 89 | :1005800013968830910571F74F5F409341010895AC 90 | :100590008FEF8AB98FE387B961E08AE00E94B104E6 91 | :1005A00061E08BE00E94B10461E088E00E94B10448 92 | :1005B00060E088E00E94D0040E9487020C94A302AD 93 | :1005C00061E088E00E94D00461E070E080E090E0AB 94 | :1005D0000E94260460E088E00C94D0040F931F93DF 95 | :1005E000CF93DF930E94EA030091420110914301EF 96 | :1005F0002091440130914501601B710B820B930BDC 97 | :10060000693771058105910508F460C00E94EA030D 98 | :10061000609342017093430180934401909345019C 99 | :1006200080912801873079F580914101E82FF0E031 100 | :10063000E050FF4F4081ABE2B1E020E030E098E0D5 101 | :10064000499FA0011124F901E40FF51FE859FF4F5C 102 | :10065000E491EC932F5F3F4F13962830310599F7C3 103 | :100660008F5FE0E0F1E0DF010D900020E9F7BD01D0 104 | :10067000615071096E1B7F0B90E00E94070580930B 105 | :10068000410110922801EAE2F1E0C9E2D1E0ABE2D7 106 | :10069000B1E08081880F80839FB78881880F917037 107 | :1006A000890F88838C91880F8C939FB7917080817C 108 | :1006B000890F808333962396139681E0E234F807FE 109 | :1006C00041F7809128018F5F80932801CAE2D1E031 110 | :1006D000FE01319780818BB9888188B9688166FB7A 111 | :1006E000662760F98AE00E94D0046881661F662749 112 | :1006F000661F8BE00E94D0040E94E002239691E0E6 113 | :10070000C234D90729F7DF91CF911F910F91089536 114 | :100710000E944C040E94C802C0E0D0E00E94EE0299 115 | :100720002097E1F30E940000F9CF0E94EA03609352 116 | :1007300042017093430180934401909345010895D1 117 | :100740001F920F920FB60F9211242F933F938F9306 118 | :100750009F93AF93BF938091460190914701A091E1 119 | :100760004801B091490130914E01232F2D5F2D3763 120 | :1007700020F40196A11DB11D05C0232F2A57029612 121 | :10078000A11DB11D20934E01809346019093470116 122 | :10079000A0934801B093490180914A0190914B0187 123 | :1007A000A0914C01B0914D010196A11DB11D809306 124 | :1007B0004A0190934B01A0934C01B0934D01BF911E 125 | :1007C000AF919F918F913F912F910F900FBE0F90FE 126 | :1007D0001F9018950F931F938FB7F89400914601BF 127 | :1007E0001091470120914801309149018FBFB80114 128 | :1007F000C9011F910F9108950F931F939FB7F8940C 129 | :1008000000914A0110914B0120914C0130914D0112 130 | :1008100086B5A89B06C08F3F21F00F5F1F4F2F4F5B 131 | :100820003F4F9FBF322F212F102F0027080F111D80 132 | :10083000211D311D42E0000F111F221F331F4A9559 133 | :10084000D1F7B801C9011F910F910895CF92DF929E 134 | :10085000EF92FF92CF93DF936B017C010E94FC0328 135 | :10086000EB010EC00E94FC036C1B7D0B683E7340C5 136 | :1008700038F081E0C81AD108E108F108C851DC4F0E 137 | :10088000C114D104E104F10469F7DF91CF91FF9025 138 | :10089000EF90DF90CF900895789484B5826084BD06 139 | :1008A00084B5816084BD85B5826085BD85B5816074 140 | :1008B00085BDEEE6F0E0808181608083E1E8F0E0D4 141 | :1008C0001082808182608083808181608083E0E803 142 | :1008D000F0E0808181608083E1EBF0E080818460E2 143 | :1008E0008083E0EBF0E0808181608083EAE7F0E0E4 144 | :1008F0008081846080838081826080838081816048 145 | :1009000080838081806880831092C1000895833045 146 | :1009100069F028F48130A1F0823011F514C08630DE 147 | :10092000B1F08730C1F08430D9F404C080918000E8 148 | :100930008F7703C0809180008F7D80938000089521 149 | :1009400084B58F7702C084B58F7D84BD0895809172 150 | :10095000B0008F7703C08091B0008F7D8093B0008E 151 | :10096000089590E0FC01E458FB4F2491FC01E0570E 152 | :10097000FB4FE491EE2399F0F0E0EE0FFF1FE255FC 153 | :10098000FB4F85919491DC019FB7F8948C91611194 154 | :1009900003C02095822301C0822B8C939FBF0895B2 155 | :1009A0000F931F93CF93DF931F92CDB7DEB7282FFE 156 | :1009B00030E0F901E859FB4F8491F901E458FB4F0D 157 | :1009C0001491F901E057FB4F04910023D1F08823E3 158 | :1009D00021F069830E9487046981E02FF0E0EE0F27 159 | :1009E000FF1FEC55FB4F85919491DC019FB7F89464 160 | :1009F0008C91611103C01095812301C0812B8C93D0 161 | :100A00009FBF0F90DF91CF911F910F910895AA1B67 162 | :100A1000BB1B51E107C0AA1FBB1FA617B70710F0E9 163 | :100A2000A61BB70B881F991F5A95A9F7809590951B 164 | :100A3000BC01CD010895EE0FFF1F0590F491E02D4C 165 | :060A40000994F894FFCFB9 166 | :100A460048656C6C6F20464F5353434F4D4D2120E4 167 | :100A5600502D53504143452C204249544348455359 168 | :080A66002121202020200000C6 169 | :00000001FF 170 | --------------------------------------------------------------------------------