the line 17 in my code above erases whole file becasue of this line https://github.com/espruino/Espruino/blob/ea8ba1c2ff9c9bfa1d19f5c5911818e0a43c7f4f/src/jsflash.c#L635 so you can write to other offsets randomly without erasing data but not to offset 0, that requires the file to be empty/erased/all \xFF
@fanoush started
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.
the line 17 in my code above erases whole file becasue of this line https://github.com/espruino/Espruino/blob/ea8ba1c2ff9c9bfa1d19f5c5911818e0a43c7f4f/src/jsflash.c#L635
so you can write to other offsets randomly without erasing data but not to offset 0, that requires the file to be empty/erased/all \xFF