process.memory().free shows the amount of memory available in blocks, which are 16 bytes each - so you actually have 16k or more free. But maybe you need to have less than that amount in flash for it to be able to successfully compact.
Either way this looks like a potential problem. I think Storage assumes that if there's a blank page then that's the end of the written Storage, which causes a problem when you go to erase a big file. I think I'll have to put a bit of work into trying to figure out how to tweak it.
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.
process.memory().free
shows the amount of memory available in blocks, which are 16 bytes each - so you actually have 16k or more free. But maybe you need to have less than that amount in flash for it to be able to successfully compact.Either way this looks like a potential problem. I think
Storage
assumes that if there's a blank page then that's the end of the written Storage, which causes a problem when you go to erase a big file. I think I'll have to put a bit of work into trying to figure out how to tweak it.