I'm trying to upload this code on ESP8266, and when I do, it just resets continuously. This also happens when you have memory bugs, but obviously, this code has no memory bugs! Here is the code:
#include "Arduino.h"
void setup()
{
Serial.begin(9600);
foo();
}
void loop()
{
}
void foo(){
for(unsigned int i = 1; i <= 10000; i++){
Serial.println("FOOBAR");
}
}
Also, in the serial monitor, I get this (per reset):
Soft WDT reset
ctx: cont
sp: 3ffef130 end: 3ffef390 offset: 01b0
>>>stack>>>
3ffef2e0: feefeffe feefeffe feefeffe 00002580
3ffef2f0: 0000001c 00000001 3ffe85b1 402023d4
3ffef300: feefeffe 00000005 3ffe842d 3ffee364
3ffef310: 3fffdad0 00000006 3ffee340 40201fd1
3ffef320: 3ffe85b0 00000000 3ffee340 40201fd1
3ffef330: 3ffe8428 00000000 3ffee340 40201fec
3ffef340: 00000001 feefeffe 3ffee340 40202010
3ffef350: feefeffe 00000000 00002580 40201c00
3ffef360: 3fffdad0 00000000 3ffee35c 40201c2e
3ffef370: feefeffe feefeffe feefeffe 402021c8
3ffef380: feefeffe feefeffe 3ffee370 40100718
<<<stack<<<
Õ®(ŽL‰Ì== I5
So, why is this happening?