I plucked out several hundred lines more, and now have ~1000 JsVars available.
My analogWrite function spits out ~4-16 pulses, to which a setWatch responds.
Consistently, I now get this error, despite not typing in 'Ctrl + C' myself
ERROR: Ctrl-C while processing interval - removing it.
Execution Interrupted during event processing.
New interpreter error: CALLBACK,MEMORY
>
{ "free": 82, "usage": 2418, "total": 2500, "history": 11
Here is my observation and question.
When writing the callback for the setWatch, my (human) memory model creates a RAM map that has one area that contains the condensed function code, and only one instance of that code to execute.
During runtime, when the callback is tripped several times, the amount of free space drops seriously, as in the above case, and in other attempts mentioned in other threads.
Q: Does the act of tripping the setWatch force a new linked area of RAM, thereby gobbling up that space? Also note that gabage collection ceases to be available at that point, and re-uploading or powereing off the device are the only options.
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.
Wed 2020.04.01
Could this concept be a potential cause?
I plucked out several hundred lines more, and now have ~1000 JsVars available.
My analogWrite function spits out ~4-16 pulses, to which a setWatch responds.
Consistently, I now get this error, despite not typing in 'Ctrl + C' myself
Here is my observation and question.
When writing the callback for the setWatch, my (human) memory model creates a RAM map that has one area that contains the condensed function code, and only one instance of that code to execute.
During runtime, when the callback is tripped several times, the amount of free space drops seriously, as in the above case, and in other attempts mentioned in other threads.
Q: Does the act of tripping the setWatch force a new linked area of RAM, thereby gobbling up that space? Also note that gabage collection ceases to be available at that point, and re-uploading or powereing off the device are the only options.
@Gordon, is this how callbacks use RAM?