aboutsummaryrefslogtreecommitdiff
path: root/bootloaders/nuevo_diskloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloaders/nuevo_diskloader')
-rw-r--r--bootloaders/nuevo_diskloader/DiskLoader.elf.hex325
-rw-r--r--bootloaders/nuevo_diskloader/DiskLoader.hex325
-rw-r--r--bootloaders/nuevo_diskloader/src/DiskLoader.cpp76
-rw-r--r--bootloaders/nuevo_diskloader/src/USBAPI.h1
-rw-r--r--bootloaders/nuevo_diskloader/src/USBCore.cpp13
5 files changed, 406 insertions, 334 deletions
diff --git a/bootloaders/nuevo_diskloader/DiskLoader.elf.hex b/bootloaders/nuevo_diskloader/DiskLoader.elf.hex
index 7fa502a..6da99d0 100644
--- a/bootloaders/nuevo_diskloader/DiskLoader.elf.hex
+++ b/bootloaders/nuevo_diskloader/DiskLoader.elf.hex
@@ -1,164 +1,167 @@
-:10700000BDC00000E0C00000DEC00000DCC0000029
-:10701000DAC00000D8C00000D6C00000D4C0000014
-:10702000D2C00000D0C000004AC30000BCC30000B2
-:10703000CAC00000C8C00000C6C00000C4C0000034
-:10704000C2C00000C0C00000BEC00000BCC0000044
-:10705000BAC00000B8C00000B6C00000B4C0000054
-:10706000B2C00000B0C00000AEC00000ACC0000064
-:10707000AAC00000A8C00000A6C00000A4C0000074
-:10708000A2C00000A0C000009EC000009CC0000084
-:107090009AC0000098C0000096C0000094C0000094
-:1070A00092C0000090C000008EC0000011241FBEDE
-:1070B000CFEFDAE0DEBFCDBFF7C0080B000202025F
-:1070C0000100090400000102020000052400100173
-:1070D0000524010101042402060524060001070518
-:1070E000810310004009040100020A0000000705A6
-:1070F00002024000000705830240000041014214E3
-:107100004505560455026403740300001E9587026A
-:107110000110030004030904220300000000000022
+:10700000BBC00000DEC00000DCC00000DAC0000031
+:10701000D8C00000D6C00000D4C00000D2C000001C
+:10702000D0C00000CEC0000065C30000D7C3000080
+:10703000C8C00000C6C00000C4C00000C2C000003C
+:10704000C0C00000BEC00000BCC00000BAC000004C
+:10705000B8C00000B6C00000B4C00000B2C000005C
+:10706000B0C00000AEC00000ACC00000AAC000006C
+:10707000A8C00000A6C00000A4C00000A2C000007C
+:10708000A0C000009EC000009CC000009AC000008C
+:1070900098C0000096C0000094C0000092C000009C
+:1070A00090C000008EC000008CC0000011241FBEE4
+:1070B000CFEFDAE0F7C0080B00020202010009047A
+:1070C0000000010202000005240010010524010156
+:1070D00001042402060524060001070581031000AF
+:1070E0004009040100020A000000070502024000F6
+:1070F0000007058302400000410142144505560483
+:1071000055026403740300001E95870201100300FA
+:107110000403090422030000000000000000000036
:10712000000000000000000000000000000000005F
-:107130000000000000000000000018034100720081
-:107140006400750069006E006F0020004C004C0068
-:1071500043001201000200000040412388000001AA
-:1071600001020001120100020200004041238800D8
-:1071700000010102000100C18081C33B11241FBE38
-:10718000CFEFDAE0DEBFCDBF11E0A0E0B1E0E2E09A
-:10719000FAE702C005900D92A830B107D9F711E0C7
-:1071A000A8E0B1E001C01D92A539B107E1F711E7F0
-:1071B000CCE7D1E703C02297FE011DD4CA37D1071F
-:1071C000D1F772D01CC41CCFFC0180818E5F8083FC
-:1071D00080E86AEB70E742E450E023C2FC01818161
-:1071E0009081913A49F48132C1F480E060E071E02D
-:1071F00047E050E016D20FC0913279F4803231F47A
-:1072000080E091E067E070E048D205C0823229F466
-:1072100082818093070181E0089580E00895FF92C4
-:107220000F931F93CF93DF93982F8B01FF2480E759
-:107230006030780738F4FF24F39483E0FB018093F7
-:107240005700E895C42FD0E0892F68E071E0AE01C7
-:1072500000D1FF2019F107B600FCFDCFD595C795E9
-:107260004C2FF801A8E0B1E020E031E009C08D9199
-:107270009D910C0130935700E895112432962F5FB1
-:107280002417A8F385E0F80180935700E89507B626
-:1072900000FCFDCF81E180935700E895DF91CF910D
-:1072A0001F910F91FF90089588E10FB6F894809395
-:1072B0006000109260000FBE3F9A209A6E9A90E88C
-:1072C000909361001092610081E885BF95BF01E055
-:1072D00005BF02E005BF769A289A479884E991E0B5
-:1072E0003CD2789484E18093880180E18093890185
-:1072F00000E010E082E0A4D08823E1F382E0DDD05A
-:10730000C82E8CEF90E7FC012491319602964491AF
-:107310002C1511F02223B9F710928B0110928A01DB
-:1073200050E082E068E071E094D0F1E4CF1679F4A7
-:10733000609108016058633028F0683111F064E012
-:1073400001C063E0C62FD0E0C15FDE4811C086E512
-:10735000C81691F480910801803321F07801DD2472
-:10736000D3942BC080910A01C82FD0E0C45FDE48BF
-:107370007801DD24D3942AC0E5E7CE1631F47801F4
-:1073800023E0D22ECCE0D1E721C0F5E5CF1639F4C9
-:10739000E0900801F0900901EE0CFF1C0DC084E69E
-:1073A000C81631F482E0B8014091090138DF03C00A
-:1073B000E4E7CE1629F07801DD24C3E1D1E706C069
-:1073C000D0900901E8017801ED0CF11C08E813E107
-:1073D00082E036D08823F9F40A301105E1F001503B
-:1073E0001040F6CF83E068E871E041E050E08DD0D6
-:1073F000DD2029F04D2D50E083E8BE0186D083E4E6
-:1074000069E871E041E050E080D0F1E5CF1609F481
-:107410006FCF87016FCF82E050D000E010E08097FF
-:1074200009F068CFDFCFFC0104C08091F1008193A7
-:1074300061506623D1F7289884E680938D010895E2
-:107440009FB7F89487708093E9008091F2009FBF06
-:107450000895282F80918E018823C1F057FF1AC00C
-:1074600015C0289890938D018091F1008193E217C7
-:10747000F307B9F74115510539F08091F2008823DF
-:1074800019F48BE68093E800AFBF02C04FEF5FEFC7
-:10749000CA010895AFB7F89427702093E90080914E
-:1074A000F200282F30E0241735070CF4A901FB0166
-:1074B0009B01240F311D94E6DACFDF93CF930F9217
-:1074C000CDB7DEB7BE016F5F7F4F41E050E0C1DF57
-:1074D000019719F08FEF9FEF02C0898190E00F9024
-:1074E000CF91DF9108952FB7F89487708093E900CA
-:1074F0008091E80085FD02C090E004C08091F20018
-:1075000090E4981B2FBF892F08955F926F927F920E
-:107510008F929F92AF92BF92CF92DF92EF92FF92A3
-:107520000F931F93CF93DF93F82E6A0180918E0102
-:10753000882319F44FEF5FEF63C08B01EA0157E036
-:10754000E52EEF208F2D90E040E2842E912C8822B2
-:1075500099223AE3532E20E4A22EB12CA822B9227C
-:1075600080EA682E8FE0782E43C08F2DBCDF282F55
-:10757000882321F4C3010197F1F73AC090E0C817BE
-:10758000D9070CF42C2FC21BD1094FB7F894E09205
-:10759000E9008114910421F406C01092F1002150F9
-:1075A0002223D9F719C0F7FC03C0F801922F10C0AD
-:1075B000C801322F06C0FC010196E491E093F1006E
-:1075C00031503323C1F706C081918093F10091506F
-:1075D0009923D1F7020F111D8091E80085FF05C0A6
-:1075E000209729F4A114B10411F05092E8004FBF84
-:1075F000209709F0BACF769884E680938C01A60193
-:10760000CA01DF91CF911F910F91FF90EF90DF9012
-:10761000CF90BF90AF909F908F907F906F905F9032
-:1076200008950F931F93182FFB01A0919101B09122
-:107630009201BA010EEF2AC017FF02C0949101C057
-:10764000908120918F01309190012A173B07ACF473
-:107650008091E8008570E1F38091E80082FF03C02B
-:107660004FEF5FEF16C09093F100C90101968F7341
-:107670009070892B11F40093E8002F5F3F4F3093F7
-:10768000900120938F016150704031966115710512
-:1076900099F6CA011F910F910895CF93DF939C0132
-:1076A000EB018091E80082FFFCCFC9016C2FBBDEAB
-:1076B0008BEF8093E800CE01DF91CF9108951F9268
-:1076C0000F920FB60F9211242F933F938F938091B7
-:1076D000E1001092E100282F83FF0FC01092E90013
-:1076E00081E08093EB001092EC0082E38093ED0048
-:1076F00010928E0188E08093F00022FF26C083E084
-:107700008093E9008091F200882319F08AE3809346
-:10771000E80080918C01882351F080918C01815088
-:1077200080938C0180918C01882309F4769A809152
-:107730008D01882351F080918D01815080938D01BE
-:1077400080918D01882309F4289A8F913F912F9180
-:107750000F900FBE0F901F90189510928E0181E030
-:107760008093D70080EA8093D80082E189BD09B474
-:1077700000FEFDCF80E98093D8008CE08093E2008A
-:107780001092E00008950895DF93CF930F92CDB744
-:10779000DEB71982CE01019617DD898190E00F9046
-:1077A000CF91DF9108951F920F920FB60F9211247F
-:1077B000EF92FF921F932F933F934F935F936F939B
-:1077C0007F938F939F93AF93BF93EF93FF93DF9339
-:1077D000CF93CDB7DEB76197DEBFCDBF1092E90082
-:1077E0008091E80083FFECC0CE01019668E01BDECB
-:1077F00082EF8093E800998197FF05C08091E800AF
-:1078000080FFFCCF03C08EEF8093E800292F30E08B
-:10781000C90180769070892B09F0B3C08A818823D2
-:1078200029F41092F1001092F100BFC0813009F4E8
-:10783000BCC0833009F4B9C0853049F48091E800B8
-:1078400080FFFCCF8B8180688093E300AEC08630E0
-:1078500009F06DC01C81EF80F8841230A9F51092F8
-:10786000E9001092900110928F01109292011092F3
-:1078700091018ADF99E0FE013996DF01292F1D92DF
-:107880002A95E9F799871A8791E09E8790E8988B67
-:107890009AEF998B20918F0130919001275F3F4F94
-:1078A0003C872B878D871092E900109290011092EF
-:1078B0008F01F0929201E092910180E0BF0149E0D6
-:1078C00050E0AFDE61DF71C01092E90010929001CC
-:1078D00010928F01F0929201E0929101113071F4B7
-:1078E00088E0E816F10411F410939301809193015C
-:1078F000882309F062C0E2E5F1E713C0133009F014
-:1079000058C08B81882319F4E4E1F1E70AC0823082
-:1079100019F4E8E1F1E705C0813009F04AC0EAE373
-:10792000F1E7449150E080E8BF017BDE3EC0873044
-:1079300009F43FC0883021F481E08093F10035C024
-:10794000893099F523703070232B99F5E7E7F1E73B
-:1079500091E031E026E39093E9003093EB008491CD
-:107960008093EC002093ED009F5F3196943099F75F
-:107970008EE78093EA001092EA008B8180938E015B
-:1079800014C08F8198851092E90010929001109296
-:107990008F0190939201809391018D81882349F406
-:1079A000CE0101961BDC882321F08EEF8093E80046
-:1079B00007C081E28093EB0003C0E4E6F1E7B1CFBA
-:1079C0006196DEBFCDBFCF91DF91FF91EF91BF9167
-:1079D000AF919F918F917F916F915F914F913F9167
-:1079E0002F911F91FF90EF900F900FBE0F901F905F
-:1079F0001895EE0FFF1F0590F491E02D0994F8946F
-:027A0000FFCFB6
-:087A020000E10000000000009B
+:1071300000000000000018034100720064007500A8
+:1071400069006E006F0020004C004C0043001201EB
+:1071500000020000004041238800000101020001FC
+:1071600012010002020000404123880000010102D8
+:10717000000100C18081DE3B11241FBECFEFDAE0A9
+:10718000DEBFCDBF11E0A0E0B1E0E8E3FAE702C066
+:1071900005900D92A830B107D9F711E0A8E0B1E051
+:1071A00001C01D92A539B107E1F711E7C8E7D1E7A2
+:1071B00003C02297FE013AD4C637D107D1F772D067
+:1071C00039C41ECFFC0180818E5F808380E866EB2E
+:1071D00070E742E450E040C2FC0181819081913A25
+:1071E00049F48132C1F480E060E071E047E050E0B2
+:1071F00033D20FC0913279F4803231F480E091E0E3
+:1072000067E070E065D205C0823229F48281809304
+:10721000070181E0089580E00895FF920F931F9386
+:10722000CF93DF93982F8B01FF2488E76030780796
+:1072300038F4FF24F39483E0FB0180935700E89532
+:10724000C42FD0E0892F68E071E0AE0100D1FF20AB
+:1072500019F107B600FCFDCFD595C7954C2FF80165
+:10726000A8E0B1E020E031E009C08D919D910C01D2
+:1072700030935700E895112432962F5F2417A8F316
+:1072800085E0F80180935700E89507B600FCFDCF34
+:1072900081E180935700E895DF91CF911F910F9185
+:1072A000FF90089588E10FB6F894809360001092E3
+:1072B00060000FBE3F9A209A6E9A90E8909361000A
+:1072C0001092610081E885BF95BF01E005BF02E033
+:1072D00005BF769A289A479884E991E059D2789424
+:1072E00084E18093880180E18093890100E010E0CF
+:1072F00082E0A4D08823E1F382E0FAD0C82E88EFA0
+:1073000090E7FC0124913196029644912C1511F0DE
+:107310002223B9F710928B0110928A0150E082E08B
+:1073200068E071E094D0F1E4CF1679F4609108013F
+:107330006058633028F0683111F064E001C063E008
+:10734000C62FD0E0C55FDE4811C086E5C81691F4AF
+:1073500080910801803321F07801DD24D3942BC083
+:1073600080910A01C82FD0E0C85FDE487801DD2493
+:10737000D3942AC0E5E7CE1631F4780123E0D22E6B
+:10738000C8E0D1E721C0F5E5CF1639F4E090080157
+:10739000F0900901EE0CFF1C0DC084E6C81631F414
+:1073A00082E0B8014091090138DF03C0E4E7CE165E
+:1073B00029F07801DD24CFE0D1E706C0D0900901A3
+:1073C000E8017801ED0CF11C08E813E101501040D0
+:1073D00009301105F1F082E031D08823D1F4F6CFE5
+:1073E00083E068E871E041E050E0AAD0DD2029F0B8
+:1073F0004D2D50E083E8BE01A3D083E469E871E03D
+:1074000041E050E09DD0F1E5CF1609F46FCF870140
+:107410006FCF82E06DD000E010E0809709F068CF78
+:10742000DFCFFC0104C08091F1008193615066239D
+:10743000D1F7289884E680938D0108959FB7F8943A
+:1074400087708093E9008091F2009FBF0895FB014F
+:107450008093E90024E69BE610C08091E80085FF58
+:10746000FCCF289820938D018091F1008193809129
+:10747000E80085FD02C09093E800415050408FEF36
+:107480004F3F580751F70895282F80918E01882388
+:10749000C1F057FF1AC015C0289890938D018091B4
+:1074A000F1008193E217F307B9F74115510539F05F
+:1074B0008091F200882319F48BE68093E800AFBF37
+:1074C00002C04FEF5FEFCA010895AFB7F89427707D
+:1074D0002093E9008091F200282F30E0241735072F
+:1074E0000CF4A901FB019B01240F311D94E6DACFB6
+:1074F000DF93CF930F92CDB7DEB7BE016F5F7F4FA3
+:1075000041E050E0C1DF019719F08FEF9FEF02C01B
+:10751000898190E00F90CF91DF9108952FB7F89473
+:1075200087708093E9008091E80085FD02C090E0BB
+:1075300004C08091F20090E4981B2FBF892F08951A
+:107540005F926F927F928F929F92AF92BF92CF92F3
+:10755000DF92EF92FF920F931F93CF93DF93F82E5A
+:107560006A0180918E01882319F44FEF5FEF63C0A9
+:107570008B01EA0157E0E52EEF208F2D90E040E2ED
+:10758000842E912C882299223AE3532E20E4A22EB5
+:10759000B12CA822B92280EA682E8FE0782E43C051
+:1075A0008F2DBCDF282F882321F4C3010197F1F729
+:1075B0003AC090E0C817D9070CF42C2FC21BD10990
+:1075C0004FB7F894E092E9008114910421F406C0C9
+:1075D0001092F10021502223D9F719C0F7FC03C003
+:1075E000F801922F10C0C801322F06C0FC0101968D
+:1075F000E491E093F10031503323C1F706C081914B
+:107600008093F10091509923D1F7020F111D8091C1
+:10761000E80085FF05C0209729F4A114B10411F0FA
+:107620005092E8004FBF209709F0BACF769884E6D1
+:1076300080938C01A601CA01DF91CF911F910F9118
+:10764000FF90EF90DF90CF90BF90AF909F908F9082
+:107650007F906F905F9008950F931F93182FFB01F9
+:10766000A0919101B0919201BA010EEF2AC017FFCB
+:1076700002C0949101C0908120918F0130919001BE
+:107680002A173B07ACF48091E8008570E1F3809104
+:10769000E80082FF03C04FEF5FEF16C09093F10048
+:1076A000C90101968F739070892B11F40093E80043
+:1076B0002F5F3F4F3093900120938F0161507040B6
+:1076C00031966115710599F6CA011F910F910895C0
+:1076D000CF93DF939C01EB018091E80082FFFCCF08
+:1076E000C9016C2F9EDE8BEF8093E800CE01DF9105
+:1076F000CF9108951F920F920FB60F9211242F93DE
+:107700003F938F938091E1001092E100282F83FF37
+:107710000FC01092E90081E08093EB001092EC0022
+:1077200082E38093ED0010928E0188E08093F00058
+:1077300022FF26C083E08093E9008091F200882335
+:1077400019F08AE38093E80080918C01882351F03E
+:1077500080918C01815080938C0180918C018823D1
+:1077600009F4769A80918D01882351F080918D01E2
+:10777000815080938D0180918D01882309F4289A8E
+:107780008F913F912F910F900FBE0F901F901895E2
+:1077900010928E0181E08093D70080EA8093D80018
+:1077A00082E189BD09B400FEFDCF80E98093D80055
+:1077B0008CE08093E2001092E00008950895DF933A
+:1077C000CF930F92CDB7DEB71982CE010196FADCC6
+:1077D000898190E00F90CF91DF9108951F920F92D1
+:1077E0000FB60F921124EF92FF921F932F933F93A6
+:1077F0004F935F936F937F938F939F93AF93BF93B9
+:10780000EF93FF93DF93CF93CDB7DEB76197DEBFE2
+:10781000CDBF1092E9008091E80083FFECC0CE015B
+:10782000019668E0FEDD82EF8093E800998197FF82
+:1078300005C08091E80080FFFCCF03C08EEF8093ED
+:10784000E800292F30E0C90180769070892B09F07B
+:10785000B3C08A81882329F41092F1001092F100BC
+:10786000BFC0813009F4BCC0833009F4B9C0853091
+:1078700049F48091E80080FFFCCF8B818068809381
+:10788000E300AEC0863009F06DC01C81EF80F88443
+:107890001230A9F51092E9001092900110928F0118
+:1078A00010929201109291018ADF99E0FE013996BF
+:1078B000DF01292F1D922A95E9F799871A8791E010
+:1078C0009E8790E8988B9AEF998B20918F01309149
+:1078D0009001275F3F4F3C872B878D871092E900EF
+:1078E0001092900110928F01F0929201E09291011A
+:1078F00080E0BF0149E050E0AFDE61DF71C010926F
+:10790000E9001092900110928F01F0929201E092A2
+:107910009101113071F488E0E816F10411F410932C
+:10792000930180919301882309F062C0EEE4F1E7AE
+:1079300013C0133009F058C08B81882319F4E0E19B
+:10794000F1E70AC0823019F4E4E1F1E705C08130C3
+:1079500009F04AC0E6E3F1E7449150E080E8BF0156
+:107960007BDE3EC0873009F43FC0883021F481E0DF
+:107970008093F10035C0893099F523703070232B46
+:1079800099F5E3E7F1E791E031E026E39093E90030
+:107990003093EB0084918093EC002093ED009F5F87
+:1079A0003196943099F78EE78093EA001092EA00BE
+:1079B0008B8180938E0114C08F8198851092E9008D
+:1079C0001092900110928F019093920180939101F7
+:1079D0008D81882349F4CE010196FEDB882321F0B6
+:1079E0008EEF8093E80007C081E28093EB0003C034
+:1079F000E0E6F1E7B1CF6196DEBFCDBFCF91DF9179
+:107A0000FF91EF91BF91AF919F918F917F916F9176
+:107A10005F914F913F912F911F91FF90EF900F90A9
+:107A20000FBE0F901F901895EE0FFF1F0590F49159
+:087A3000E02D0994F894FFCF4A
+:087A380000E100000000000065
:040000030000700089
:00000001FF
diff --git a/bootloaders/nuevo_diskloader/DiskLoader.hex b/bootloaders/nuevo_diskloader/DiskLoader.hex
index 7fa502a..6da99d0 100644
--- a/bootloaders/nuevo_diskloader/DiskLoader.hex
+++ b/bootloaders/nuevo_diskloader/DiskLoader.hex
@@ -1,164 +1,167 @@
-:10700000BDC00000E0C00000DEC00000DCC0000029
-:10701000DAC00000D8C00000D6C00000D4C0000014
-:10702000D2C00000D0C000004AC30000BCC30000B2
-:10703000CAC00000C8C00000C6C00000C4C0000034
-:10704000C2C00000C0C00000BEC00000BCC0000044
-:10705000BAC00000B8C00000B6C00000B4C0000054
-:10706000B2C00000B0C00000AEC00000ACC0000064
-:10707000AAC00000A8C00000A6C00000A4C0000074
-:10708000A2C00000A0C000009EC000009CC0000084
-:107090009AC0000098C0000096C0000094C0000094
-:1070A00092C0000090C000008EC0000011241FBEDE
-:1070B000CFEFDAE0DEBFCDBFF7C0080B000202025F
-:1070C0000100090400000102020000052400100173
-:1070D0000524010101042402060524060001070518
-:1070E000810310004009040100020A0000000705A6
-:1070F00002024000000705830240000041014214E3
-:107100004505560455026403740300001E9587026A
-:107110000110030004030904220300000000000022
+:10700000BBC00000DEC00000DCC00000DAC0000031
+:10701000D8C00000D6C00000D4C00000D2C000001C
+:10702000D0C00000CEC0000065C30000D7C3000080
+:10703000C8C00000C6C00000C4C00000C2C000003C
+:10704000C0C00000BEC00000BCC00000BAC000004C
+:10705000B8C00000B6C00000B4C00000B2C000005C
+:10706000B0C00000AEC00000ACC00000AAC000006C
+:10707000A8C00000A6C00000A4C00000A2C000007C
+:10708000A0C000009EC000009CC000009AC000008C
+:1070900098C0000096C0000094C0000092C000009C
+:1070A00090C000008EC000008CC0000011241FBEE4
+:1070B000CFEFDAE0F7C0080B00020202010009047A
+:1070C0000000010202000005240010010524010156
+:1070D00001042402060524060001070581031000AF
+:1070E0004009040100020A000000070502024000F6
+:1070F0000007058302400000410142144505560483
+:1071000055026403740300001E95870201100300FA
+:107110000403090422030000000000000000000036
:10712000000000000000000000000000000000005F
-:107130000000000000000000000018034100720081
-:107140006400750069006E006F0020004C004C0068
-:1071500043001201000200000040412388000001AA
-:1071600001020001120100020200004041238800D8
-:1071700000010102000100C18081C33B11241FBE38
-:10718000CFEFDAE0DEBFCDBF11E0A0E0B1E0E2E09A
-:10719000FAE702C005900D92A830B107D9F711E0C7
-:1071A000A8E0B1E001C01D92A539B107E1F711E7F0
-:1071B000CCE7D1E703C02297FE011DD4CA37D1071F
-:1071C000D1F772D01CC41CCFFC0180818E5F8083FC
-:1071D00080E86AEB70E742E450E023C2FC01818161
-:1071E0009081913A49F48132C1F480E060E071E02D
-:1071F00047E050E016D20FC0913279F4803231F47A
-:1072000080E091E067E070E048D205C0823229F466
-:1072100082818093070181E0089580E00895FF92C4
-:107220000F931F93CF93DF93982F8B01FF2480E759
-:107230006030780738F4FF24F39483E0FB018093F7
-:107240005700E895C42FD0E0892F68E071E0AE01C7
-:1072500000D1FF2019F107B600FCFDCFD595C795E9
-:107260004C2FF801A8E0B1E020E031E009C08D9199
-:107270009D910C0130935700E895112432962F5FB1
-:107280002417A8F385E0F80180935700E89507B626
-:1072900000FCFDCF81E180935700E895DF91CF910D
-:1072A0001F910F91FF90089588E10FB6F894809395
-:1072B0006000109260000FBE3F9A209A6E9A90E88C
-:1072C000909361001092610081E885BF95BF01E055
-:1072D00005BF02E005BF769A289A479884E991E0B5
-:1072E0003CD2789484E18093880180E18093890185
-:1072F00000E010E082E0A4D08823E1F382E0DDD05A
-:10730000C82E8CEF90E7FC012491319602964491AF
-:107310002C1511F02223B9F710928B0110928A01DB
-:1073200050E082E068E071E094D0F1E4CF1679F4A7
-:10733000609108016058633028F0683111F064E012
-:1073400001C063E0C62FD0E0C15FDE4811C086E512
-:10735000C81691F480910801803321F07801DD2472
-:10736000D3942BC080910A01C82FD0E0C45FDE48BF
-:107370007801DD24D3942AC0E5E7CE1631F47801F4
-:1073800023E0D22ECCE0D1E721C0F5E5CF1639F4C9
-:10739000E0900801F0900901EE0CFF1C0DC084E69E
-:1073A000C81631F482E0B8014091090138DF03C00A
-:1073B000E4E7CE1629F07801DD24C3E1D1E706C069
-:1073C000D0900901E8017801ED0CF11C08E813E107
-:1073D00082E036D08823F9F40A301105E1F001503B
-:1073E0001040F6CF83E068E871E041E050E08DD0D6
-:1073F000DD2029F04D2D50E083E8BE0186D083E4E6
-:1074000069E871E041E050E080D0F1E5CF1609F481
-:107410006FCF87016FCF82E050D000E010E08097FF
-:1074200009F068CFDFCFFC0104C08091F1008193A7
-:1074300061506623D1F7289884E680938D010895E2
-:107440009FB7F89487708093E9008091F2009FBF06
-:107450000895282F80918E018823C1F057FF1AC00C
-:1074600015C0289890938D018091F1008193E217C7
-:10747000F307B9F74115510539F08091F2008823DF
-:1074800019F48BE68093E800AFBF02C04FEF5FEFC7
-:10749000CA010895AFB7F89427702093E90080914E
-:1074A000F200282F30E0241735070CF4A901FB0166
-:1074B0009B01240F311D94E6DACFDF93CF930F9217
-:1074C000CDB7DEB7BE016F5F7F4F41E050E0C1DF57
-:1074D000019719F08FEF9FEF02C0898190E00F9024
-:1074E000CF91DF9108952FB7F89487708093E900CA
-:1074F0008091E80085FD02C090E004C08091F20018
-:1075000090E4981B2FBF892F08955F926F927F920E
-:107510008F929F92AF92BF92CF92DF92EF92FF92A3
-:107520000F931F93CF93DF93F82E6A0180918E0102
-:10753000882319F44FEF5FEF63C08B01EA0157E036
-:10754000E52EEF208F2D90E040E2842E912C8822B2
-:1075500099223AE3532E20E4A22EB12CA822B9227C
-:1075600080EA682E8FE0782E43C08F2DBCDF282F55
-:10757000882321F4C3010197F1F73AC090E0C817BE
-:10758000D9070CF42C2FC21BD1094FB7F894E09205
-:10759000E9008114910421F406C01092F1002150F9
-:1075A0002223D9F719C0F7FC03C0F801922F10C0AD
-:1075B000C801322F06C0FC010196E491E093F1006E
-:1075C00031503323C1F706C081918093F10091506F
-:1075D0009923D1F7020F111D8091E80085FF05C0A6
-:1075E000209729F4A114B10411F05092E8004FBF84
-:1075F000209709F0BACF769884E680938C01A60193
-:10760000CA01DF91CF911F910F91FF90EF90DF9012
-:10761000CF90BF90AF909F908F907F906F905F9032
-:1076200008950F931F93182FFB01A0919101B09122
-:107630009201BA010EEF2AC017FF02C0949101C057
-:10764000908120918F01309190012A173B07ACF473
-:107650008091E8008570E1F38091E80082FF03C02B
-:107660004FEF5FEF16C09093F100C90101968F7341
-:107670009070892B11F40093E8002F5F3F4F3093F7
-:10768000900120938F016150704031966115710512
-:1076900099F6CA011F910F910895CF93DF939C0132
-:1076A000EB018091E80082FFFCCFC9016C2FBBDEAB
-:1076B0008BEF8093E800CE01DF91CF9108951F9268
-:1076C0000F920FB60F9211242F933F938F938091B7
-:1076D000E1001092E100282F83FF0FC01092E90013
-:1076E00081E08093EB001092EC0082E38093ED0048
-:1076F00010928E0188E08093F00022FF26C083E084
-:107700008093E9008091F200882319F08AE3809346
-:10771000E80080918C01882351F080918C01815088
-:1077200080938C0180918C01882309F4769A809152
-:107730008D01882351F080918D01815080938D01BE
-:1077400080918D01882309F4289A8F913F912F9180
-:107750000F900FBE0F901F90189510928E0181E030
-:107760008093D70080EA8093D80082E189BD09B474
-:1077700000FEFDCF80E98093D8008CE08093E2008A
-:107780001092E00008950895DF93CF930F92CDB744
-:10779000DEB71982CE01019617DD898190E00F9046
-:1077A000CF91DF9108951F920F920FB60F9211247F
-:1077B000EF92FF921F932F933F934F935F936F939B
-:1077C0007F938F939F93AF93BF93EF93FF93DF9339
-:1077D000CF93CDB7DEB76197DEBFCDBF1092E90082
-:1077E0008091E80083FFECC0CE01019668E01BDECB
-:1077F00082EF8093E800998197FF05C08091E800AF
-:1078000080FFFCCF03C08EEF8093E800292F30E08B
-:10781000C90180769070892B09F0B3C08A818823D2
-:1078200029F41092F1001092F100BFC0813009F4E8
-:10783000BCC0833009F4B9C0853049F48091E800B8
-:1078400080FFFCCF8B8180688093E300AEC08630E0
-:1078500009F06DC01C81EF80F8841230A9F51092F8
-:10786000E9001092900110928F01109292011092F3
-:1078700091018ADF99E0FE013996DF01292F1D92DF
-:107880002A95E9F799871A8791E09E8790E8988B67
-:107890009AEF998B20918F0130919001275F3F4F94
-:1078A0003C872B878D871092E900109290011092EF
-:1078B0008F01F0929201E092910180E0BF0149E0D6
-:1078C00050E0AFDE61DF71C01092E90010929001CC
-:1078D00010928F01F0929201E0929101113071F4B7
-:1078E00088E0E816F10411F410939301809193015C
-:1078F000882309F062C0E2E5F1E713C0133009F014
-:1079000058C08B81882319F4E4E1F1E70AC0823082
-:1079100019F4E8E1F1E705C0813009F04AC0EAE373
-:10792000F1E7449150E080E8BF017BDE3EC0873044
-:1079300009F43FC0883021F481E08093F10035C024
-:10794000893099F523703070232B99F5E7E7F1E73B
-:1079500091E031E026E39093E9003093EB008491CD
-:107960008093EC002093ED009F5F3196943099F75F
-:107970008EE78093EA001092EA008B8180938E015B
-:1079800014C08F8198851092E90010929001109296
-:107990008F0190939201809391018D81882349F406
-:1079A000CE0101961BDC882321F08EEF8093E80046
-:1079B00007C081E28093EB0003C0E4E6F1E7B1CFBA
-:1079C0006196DEBFCDBFCF91DF91FF91EF91BF9167
-:1079D000AF919F918F917F916F915F914F913F9167
-:1079E0002F911F91FF90EF900F900FBE0F901F905F
-:1079F0001895EE0FFF1F0590F491E02D0994F8946F
-:027A0000FFCFB6
-:087A020000E10000000000009B
+:1071300000000000000018034100720064007500A8
+:1071400069006E006F0020004C004C0043001201EB
+:1071500000020000004041238800000101020001FC
+:1071600012010002020000404123880000010102D8
+:10717000000100C18081DE3B11241FBECFEFDAE0A9
+:10718000DEBFCDBF11E0A0E0B1E0E8E3FAE702C066
+:1071900005900D92A830B107D9F711E0A8E0B1E051
+:1071A00001C01D92A539B107E1F711E7C8E7D1E7A2
+:1071B00003C02297FE013AD4C637D107D1F772D067
+:1071C00039C41ECFFC0180818E5F808380E866EB2E
+:1071D00070E742E450E040C2FC0181819081913A25
+:1071E00049F48132C1F480E060E071E047E050E0B2
+:1071F00033D20FC0913279F4803231F480E091E0E3
+:1072000067E070E065D205C0823229F48281809304
+:10721000070181E0089580E00895FF920F931F9386
+:10722000CF93DF93982F8B01FF2488E76030780796
+:1072300038F4FF24F39483E0FB0180935700E89532
+:10724000C42FD0E0892F68E071E0AE0100D1FF20AB
+:1072500019F107B600FCFDCFD595C7954C2FF80165
+:10726000A8E0B1E020E031E009C08D919D910C01D2
+:1072700030935700E895112432962F5F2417A8F316
+:1072800085E0F80180935700E89507B600FCFDCF34
+:1072900081E180935700E895DF91CF911F910F9185
+:1072A000FF90089588E10FB6F894809360001092E3
+:1072B00060000FBE3F9A209A6E9A90E8909361000A
+:1072C0001092610081E885BF95BF01E005BF02E033
+:1072D00005BF769A289A479884E991E059D2789424
+:1072E00084E18093880180E18093890100E010E0CF
+:1072F00082E0A4D08823E1F382E0FAD0C82E88EFA0
+:1073000090E7FC0124913196029644912C1511F0DE
+:107310002223B9F710928B0110928A0150E082E08B
+:1073200068E071E094D0F1E4CF1679F4609108013F
+:107330006058633028F0683111F064E001C063E008
+:10734000C62FD0E0C55FDE4811C086E5C81691F4AF
+:1073500080910801803321F07801DD24D3942BC083
+:1073600080910A01C82FD0E0C85FDE487801DD2493
+:10737000D3942AC0E5E7CE1631F4780123E0D22E6B
+:10738000C8E0D1E721C0F5E5CF1639F4E090080157
+:10739000F0900901EE0CFF1C0DC084E6C81631F414
+:1073A00082E0B8014091090138DF03C0E4E7CE165E
+:1073B00029F07801DD24CFE0D1E706C0D0900901A3
+:1073C000E8017801ED0CF11C08E813E101501040D0
+:1073D00009301105F1F082E031D08823D1F4F6CFE5
+:1073E00083E068E871E041E050E0AAD0DD2029F0B8
+:1073F0004D2D50E083E8BE01A3D083E469E871E03D
+:1074000041E050E09DD0F1E5CF1609F46FCF870140
+:107410006FCF82E06DD000E010E0809709F068CF78
+:10742000DFCFFC0104C08091F1008193615066239D
+:10743000D1F7289884E680938D0108959FB7F8943A
+:1074400087708093E9008091F2009FBF0895FB014F
+:107450008093E90024E69BE610C08091E80085FF58
+:10746000FCCF289820938D018091F1008193809129
+:10747000E80085FD02C09093E800415050408FEF36
+:107480004F3F580751F70895282F80918E01882388
+:10749000C1F057FF1AC015C0289890938D018091B4
+:1074A000F1008193E217F307B9F74115510539F05F
+:1074B0008091F200882319F48BE68093E800AFBF37
+:1074C00002C04FEF5FEFCA010895AFB7F89427707D
+:1074D0002093E9008091F200282F30E0241735072F
+:1074E0000CF4A901FB019B01240F311D94E6DACFB6
+:1074F000DF93CF930F92CDB7DEB7BE016F5F7F4FA3
+:1075000041E050E0C1DF019719F08FEF9FEF02C01B
+:10751000898190E00F90CF91DF9108952FB7F89473
+:1075200087708093E9008091E80085FD02C090E0BB
+:1075300004C08091F20090E4981B2FBF892F08951A
+:107540005F926F927F928F929F92AF92BF92CF92F3
+:10755000DF92EF92FF920F931F93CF93DF93F82E5A
+:107560006A0180918E01882319F44FEF5FEF63C0A9
+:107570008B01EA0157E0E52EEF208F2D90E040E2ED
+:10758000842E912C882299223AE3532E20E4A22EB5
+:10759000B12CA822B92280EA682E8FE0782E43C051
+:1075A0008F2DBCDF282F882321F4C3010197F1F729
+:1075B0003AC090E0C817D9070CF42C2FC21BD10990
+:1075C0004FB7F894E092E9008114910421F406C0C9
+:1075D0001092F10021502223D9F719C0F7FC03C003
+:1075E000F801922F10C0C801322F06C0FC0101968D
+:1075F000E491E093F10031503323C1F706C081914B
+:107600008093F10091509923D1F7020F111D8091C1
+:10761000E80085FF05C0209729F4A114B10411F0FA
+:107620005092E8004FBF209709F0BACF769884E6D1
+:1076300080938C01A601CA01DF91CF911F910F9118
+:10764000FF90EF90DF90CF90BF90AF909F908F9082
+:107650007F906F905F9008950F931F93182FFB01F9
+:10766000A0919101B0919201BA010EEF2AC017FFCB
+:1076700002C0949101C0908120918F0130919001BE
+:107680002A173B07ACF48091E8008570E1F3809104
+:10769000E80082FF03C04FEF5FEF16C09093F10048
+:1076A000C90101968F739070892B11F40093E80043
+:1076B0002F5F3F4F3093900120938F0161507040B6
+:1076C00031966115710599F6CA011F910F910895C0
+:1076D000CF93DF939C01EB018091E80082FFFCCF08
+:1076E000C9016C2F9EDE8BEF8093E800CE01DF9105
+:1076F000CF9108951F920F920FB60F9211242F93DE
+:107700003F938F938091E1001092E100282F83FF37
+:107710000FC01092E90081E08093EB001092EC0022
+:1077200082E38093ED0010928E0188E08093F00058
+:1077300022FF26C083E08093E9008091F200882335
+:1077400019F08AE38093E80080918C01882351F03E
+:1077500080918C01815080938C0180918C018823D1
+:1077600009F4769A80918D01882351F080918D01E2
+:10777000815080938D0180918D01882309F4289A8E
+:107780008F913F912F910F900FBE0F901F901895E2
+:1077900010928E0181E08093D70080EA8093D80018
+:1077A00082E189BD09B400FEFDCF80E98093D80055
+:1077B0008CE08093E2001092E00008950895DF933A
+:1077C000CF930F92CDB7DEB71982CE010196FADCC6
+:1077D000898190E00F90CF91DF9108951F920F92D1
+:1077E0000FB60F921124EF92FF921F932F933F93A6
+:1077F0004F935F936F937F938F939F93AF93BF93B9
+:10780000EF93FF93DF93CF93CDB7DEB76197DEBFE2
+:10781000CDBF1092E9008091E80083FFECC0CE015B
+:10782000019668E0FEDD82EF8093E800998197FF82
+:1078300005C08091E80080FFFCCF03C08EEF8093ED
+:10784000E800292F30E0C90180769070892B09F07B
+:10785000B3C08A81882329F41092F1001092F100BC
+:10786000BFC0813009F4BCC0833009F4B9C0853091
+:1078700049F48091E80080FFFCCF8B818068809381
+:10788000E300AEC0863009F06DC01C81EF80F88443
+:107890001230A9F51092E9001092900110928F0118
+:1078A00010929201109291018ADF99E0FE013996BF
+:1078B000DF01292F1D922A95E9F799871A8791E010
+:1078C0009E8790E8988B9AEF998B20918F01309149
+:1078D0009001275F3F4F3C872B878D871092E900EF
+:1078E0001092900110928F01F0929201E09291011A
+:1078F00080E0BF0149E050E0AFDE61DF71C010926F
+:10790000E9001092900110928F01F0929201E092A2
+:107910009101113071F488E0E816F10411F410932C
+:10792000930180919301882309F062C0EEE4F1E7AE
+:1079300013C0133009F058C08B81882319F4E0E19B
+:10794000F1E70AC0823019F4E4E1F1E705C08130C3
+:1079500009F04AC0E6E3F1E7449150E080E8BF0156
+:107960007BDE3EC0873009F43FC0883021F481E0DF
+:107970008093F10035C0893099F523703070232B46
+:1079800099F5E3E7F1E791E031E026E39093E90030
+:107990003093EB0084918093EC002093ED009F5F87
+:1079A0003196943099F78EE78093EA001092EA00BE
+:1079B0008B8180938E0114C08F8198851092E9008D
+:1079C0001092900110928F019093920180939101F7
+:1079D0008D81882349F4CE010196FEDB882321F0B6
+:1079E0008EEF8093E80007C081E28093EB0003C034
+:1079F000E0E6F1E7B1CF6196DEBFCDBFCF91DF9179
+:107A0000FF91EF91BF91AF919F918F917F916F9176
+:107A10005F914F913F912F911F91FF90EF900F90A9
+:107A20000FBE0F901F901895EE0FFF1F0590F49159
+:087A3000E02D0994F894FFCF4A
+:087A380000E100000000000065
:040000030000700089
:00000001FF
diff --git a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
index cbb709b..3b8657e 100644
--- a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
+++ b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
@@ -3,7 +3,8 @@
*/
#include "Platform.h"
-#include "USBCore.h"
+//#include "USBCore.h"
+
//extern "C"
void entrypoint(void) __attribute__ ((naked)) __attribute__ ((section (".vectors")));
@@ -12,10 +13,10 @@ void entrypoint(void)
asm volatile (
"eor r1, r1\n" // Zero register
"out 0x3F, r1\n" // SREG
- "ldi r28, 0xFF\n"
- "ldi r29, 0x0A\n"
- "out 0x3E, r29\n" // SPH
- "out 0x3D, r28\n" // SPL
+ "ldi r28, 0xFF\n" // Y-register
+ "ldi r29, 0x0A\n" // Y-register
+// "out 0x3E, r29\n" // SPH
+// "out 0x3D, r28\n" // SPL
"rjmp main" // Stack is all set up, start the main code
::);
}
@@ -27,11 +28,11 @@ volatile u16 _timeout;
void Program(u8 ep, u16 page, u8 count)
{
- u8 write = page < 28*1024; // Don't write over firmware please
+ u8 write = page < 30*1024; // Don't write over firmware please
if (write)
boot_page_erase(page);
- USB_Recv(ep,_flashbuf,count); // Read while page is erasing
+ USB_Recv_block(ep,_flashbuf,count); // Read while page is erasing
if (!write)
return;
@@ -93,6 +94,20 @@ const u8 _consts[] =
0x00, //
};
+int getch(void)
+{
+ u16 timeout;
+ u8 c;
+ for (timeout = 0; timeout; timeout--)
+ {
+ c = USB_Recv(CDC_RX);
+ if (c != -1)
+ return c;
+ }
+ return -1;
+}
+
+
int main(void) __attribute__ ((naked));
int main()
{
@@ -110,14 +125,18 @@ int main()
);
TX_LED_OFF();
RX_LED_OFF();
- L_LED_OFF();
- USB.attach();
+ L_LED_OFF();
+
+ /* UART setup stuff */
+
+ /* end UART setup stuff */
+
+ USB.attach();
sei();
_inSync = STK_INSYNC;
_ok = STK_OK;
-
for (;;)
{
u8* packet = _flashbuf;
@@ -143,7 +162,8 @@ int main()
}
_timeout = 0;
// Read params
- USB_Recv(CDC_RX, packet, len);
+// USB_Recv(CDC_RX, packet, len);
+ USB_Recv_block(CDC_RX, packet, len);
// Send a response
u8 send = 0;
@@ -187,8 +207,40 @@ int main()
// if (Serial.available() > 0 && Serial.read() != ' ')
// break;
// if (USB_Available(CDC_RX) && USB_Recv(CDC_RX) != ' ')
+
+// u8 countdown = 10;
+// while (!USB_Available(CDC_RX))
+// {
+// if (countdown-- == 0)
+// break;
+// }
+// u8 x = USB_Recv(CDC_RX);
+// if (x != -1 && x != ' ')
+// {
+// L_LED_ON();
+// break;
+// }
+
+// if (getch() != ' ')
+// break;
+
+// while (!USB_Available(CDC_RX))
+// ;
+//
+// int x = USB_Recv(CDC_RX);
+// if (x == -1)
+// {
+// UEINTX = 0x6B;
+// break;
+// }
+// else if (x != ' ')
+// {
+//// UEINTX = 0x6B;
+// break;
+// }
+
u16 countdown = 5000;
- while (!USB_Available(CDC_RX) && countdown-- > 10)
+ while (countdown-- > 10 && !USB_Available(CDC_RX))
;
if (USB_Recv(CDC_RX) != ' ')
break;
diff --git a/bootloaders/nuevo_diskloader/src/USBAPI.h b/bootloaders/nuevo_diskloader/src/USBAPI.h
index ca205a1..1724ce1 100644
--- a/bootloaders/nuevo_diskloader/src/USBAPI.h
+++ b/bootloaders/nuevo_diskloader/src/USBAPI.h
@@ -74,6 +74,7 @@ int USB_RecvControl(void* d, int len);
uint8_t USB_Available(uint8_t ep);
int USB_Send(uint8_t ep, const void* data, int len); // blocking
int USB_Recv(uint8_t ep, void* data, int len); // non-blocking
+void USB_Recv_block(u8 ep, u8* dst, int len); // blocking
int USB_Recv(uint8_t ep); // non-blocking
void USB_Flush(uint8_t ep);
diff --git a/bootloaders/nuevo_diskloader/src/USBCore.cpp b/bootloaders/nuevo_diskloader/src/USBCore.cpp
index cfcef73..fffe6f7 100644
--- a/bootloaders/nuevo_diskloader/src/USBCore.cpp
+++ b/bootloaders/nuevo_diskloader/src/USBCore.cpp
@@ -217,6 +217,19 @@ u8 USB_Available(u8 ep)
return FifoByteCount();
}
+void USB_Recv_block(u8 ep, u8* dst, int len)
+{
+ SetEP(ep);
+ while (len--)
+ {
+ while (!ReadWriteAllowed())
+ ;
+ *dst++ = Recv8();
+ if (!ReadWriteAllowed()) // release empty buffer
+ ReleaseRX();
+ }
+}
+
// Non Blocking receive
// Return number of bytes read
int USB_Recv(u8 ep, void* d, int len)