After switching to "save to flash" in the IDE, i got a lot of more RAM free. After deleting all files except ".bootcde" and calling compact, nothing new. I do not get flashmemory back.
Then i made a very ugly hack that seems to work!
// ST is the storage object
var x = E.toString(ST.read(".bootcde"));
if (x===undefined) { throw new Error("Not enough RAM for .bootcde"); }
else {
// Ugly hack !
eval('var x = E.toString(ST.read(".bootcde")); ST.eraseAll(); ST.write(".bootcde",x); console.log("survived");');
// Here i do a reset via my custom watchdog function.
}
After the reboot everything is working fine, storage is freed and ready for reuse ;-)
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.
Hi Gordon
After switching to "save to flash" in the IDE, i got a lot of more RAM free. After deleting all files except ".bootcde" and calling compact, nothing new. I do not get flashmemory back.
Then i made a very ugly hack that seems to work!
After the reboot everything is working fine, storage is freed and ready for reuse ;-)
Sacha