I'm afraid it's a bit difficult to handle nicely. Hopefully it'll get done at some point, but about the only way of getting it to work is to use other flash pages as temporary storage, which seems a bit of a waste of flash lifetime.
Are you really in a situation where you absolutely need that ~2kB of flash memory? As I said above, once you start using other flash pages, those pages should still be able to be cleared automatically with eraseAll.
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.
I'm afraid it's a bit difficult to handle nicely. Hopefully it'll get done at some point, but about the only way of getting it to work is to use other flash pages as temporary storage, which seems a bit of a waste of flash lifetime.
Are you really in a situation where you absolutely need that ~2kB of flash memory? As I said above, once you start using other flash pages, those pages should still be able to be cleared automatically with eraseAll.