After I got over some memory inpasses - putting stuff in functions rather than execute on upload / level 0 - and setting to Save on send - write directly into the flash rather than RAM - I hit a next wall. Interpreter complains about:
Execution Interrupted during event processing.
Uncaught Error: Too much recursion - the stack is about to overflow
I know that i'm not in an infinite recursion... Packing things in a timeout did not help to cut the calling hierarchy. Interestingly, it is on a return. The call is triggered by a watched button release.
How can I increase the stack?
Console output:
Execution Interrupted during event processing.
Uncaught Error: Too much recursion - the stack is about to overflow
at line 1 col 15
var b=c?a^7:a;return[b&&4?0:1];
^
in function called from line 1 col 50
this.dsp.setColor.apply(this.dsp,this.clrs[0](a,b)),this;
^
in function "clr" called from line 1 col 72
...return b.fnt(a[0]).clr(a[1]).dsp.drawString(d,(e||0)+a[2],(f...
^
in function "dl" called from line 1 col 401
...0],h,b[2],b[3],g],m[0],m[1]));
^
in function "sliDu" called from line 1 col 142
...6],a[7],a[8],a[9],e,a[11],g);}
^
in function "sliU" called from line 1 col 263
...a.sliU(a,b,b===a.ef?j:g,f,d));}
^
in function "sli" called from line 1 col 33
b&&(a.f|=b===c?256:8,a[b[1]](a,b));
^
in function called from line 1 col 662
...b===c?256:8,a[b[1]](a,b));}),a.lf=a.af=0,a.dx=a.dy=-1;
^
in function "evt" called from line 1 col 7
a.evt(),(b=a.sx)>-1&&a._seu(a,(i=a.es)[b],i,b,-1),a.fl(),c[1...
^
in function "g" called from line 1 col 45
a[1]&&a[0]&&g(a,Math.round(b.time*1000)-a[1]);
^
in function called from system
>
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
After I got over some memory inpasses - putting stuff in functions rather than execute on upload / level 0 - and setting to Save on send - write directly into the flash rather than RAM - I hit a next wall. Interpreter complains about:
I know that i'm not in an infinite recursion... Packing things in a timeout did not help to cut the calling hierarchy. Interestingly, it is on a return. The call is triggered by a watched button release.
How can I increase the stack?
Console output: