Permalink
Browse files

Fix to optiboot infinite loop problem.

Explicitly setting R1 to 0 so that the watchdog timer is properly initializing, preventing it from timing out and resetting the processor.

http://code.google.com/p/optiboot/issues/detail?id=26
http://code.google.com/p/arduino/issues/detail?id=446
  • Loading branch information...
1 parent 5009fc1 commit 94168bd0f4556f4f1748dd133ffa834402789ddc @damellis damellis committed Jan 15, 2011
@@ -213,7 +213,7 @@ int main(void) {
// If not, uncomment the following instructions:
// cli();
// SP=RAMEND; // This is done by hardware reset
- // asm volatile ("clr __zero_reg__");
+ asm volatile ("clr __zero_reg__");
uint8_t ch;
@@ -1,33 +1,33 @@
-:107E000085E08093810082E08093C00088E18093C8
-:107E1000C10086E08093C20080E18093C40084B7F3
-:107E200014BE81FFD0D08DE0C8D0259A86E020E333
-:107E30003CEF91E0309385002093840096BBB09B8B
-:107E4000FECF1D9AA8958150A9F7DD24D394A5E013
-:107E5000EA2EF1E1FF2EA4D0813421F481E0BED0DE
-:107E600083E024C0823411F484E103C0853419F422
-:107E700085E0B4D08AC08535A1F492D0082F10E0F7
-:107E800010930102009300028BD090E0982F882776
-:107E9000802B912B880F991F9093010280930002F1
-:107EA00073C0863529F484E099D080E071D06DC02C
-:107EB000843609F043C07CD0E0910002F0910102C9
-:107EC00083E080935700E895C0E0D1E069D08993C2
-:107ED000809102028150809302028823B9F778D002
-:107EE00007B600FCFDCF4091000250910102A0E0D6
-:107EF000B1E02C9130E011968C91119790E0982F81
-:107F00008827822B932B1296FA010C01D0925700EE
-:107F1000E89511244E5F5F4FF1E0A038BF0749F7A5
-:107F2000E0910002F0910102E0925700E89507B657
-:107F300000FCFDCFF0925700E89527C08437B9F4D4
-:107F400037D046D0E0910002F09101023196F093D3
-:107F50000102E09300023197E4918E2F19D08091B5
-:107F60000202815080930202882361F70EC0853798
-:107F700039F42ED08EE10CD085E90AD08FE096CF6F
-:107F8000813511F488E019D023D080E101D063CF8E
-:107F9000982F8091C00085FFFCCF9093C600089574
-:107FA000A8958091C00087FFFCCF8091C6000895FE
-:107FB000F7DFF6DF80930202F3CFE0E6F0E098E12E
-:107FC00090838083089580E0F8DFEE27FF270994EF
-:107FD000E7DF803209F0F7DF84E1DACF1F93182F53
-:0C7FE000DFDF1150E9F7F4DF1F91089576
+:107E0000112485E08093810082E08093C00088E1A6
+:107E10008093C10086E08093C20080E18093C4001B
+:107E200084B714BE81FFD0D08DE0C8D0259A86E0FB
+:107E300020E33CEF91E0309385002093840096BBD3
+:107E4000B09BFECF1D9AA8958150A9F7DD24D3944D
+:107E5000A5E0EA2EF1E1FF2EA4D0813421F481E0E7
+:107E6000BED083E024C0823411F484E103C08534A1
+:107E700019F485E0B4D08AC08535A1F492D0082FDA
+:107E800010E010930102009300028BD090E0982F35
+:107E90008827802B912B880F991F90930102809344
+:107EA000000273C0863529F484E099D080E071D057
+:107EB0006DC0843609F043C07CD0E0910002F0919F
+:107EC000010283E080935700E895C0E0D1E069D0DB
+:107ED0008993809102028150809302028823B9F72E
+:107EE00078D007B600FCFDCF40910002509101020E
+:107EF000A0E0B1E02C9130E011968C91119790E0C8
+:107F0000982F8827822B932B1296FA010C01D0927E
+:107F10005700E89511244E5F5F4FF1E0A038BF078E
+:107F200049F7E0910002F0910102E0925700E895D4
+:107F300007B600FCFDCFF0925700E89527C08437C4
+:107F4000B9F437D046D0E0910002F09101023196A9
+:107F5000F0930102E09300023197E4918E2F19D043
+:107F600080910202815080930202882361F70EC043
+:107F7000853739F42ED08EE10CD085E90AD08FE018
+:107F800096CF813511F488E019D023D080E101D05B
+:107F900063CF982F8091C00085FFFCCF9093C600DF
+:107FA0000895A8958091C00087FFFCCF8091C600FE
+:107FB0000895F7DFF6DF80930202F3CFE0E6F0E00A
+:107FC00098E190838083089580E0F8DFEE27FF2713
+:107FD0000994E7DF803209F0F7DF84E1DACF1F93FD
+:0E7FE000182FDFDF1150E9F7F4DF1F9108952D
:0400000300007E007B
:00000001FF
Oops, something went wrong.

0 comments on commit 94168bd

Please sign in to comment.