I am running the P8 SPIFLASH version of Espruino by @fanoush on a similar smart watch, but I have managed to get the Flash memory into a strange state whereby I cannot write to it with the Storage class.
The Flash is writeable - I can update the bootloader and flash Espruino builds to it. I can also erase, read and write flash pages, but any attempt to write a file fails with a timeout. Rebooting doesn't help. This device has been working well, and I had been reading and writing to Storage, but it seems that something is out of alignment!
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 am running the P8 SPIFLASH version of Espruino by @fanoush on a similar smart watch, but I have managed to get the Flash memory into a strange state whereby I cannot write to it with the Storage class.
The Flash is writeable - I can update the bootloader and flash Espruino builds to it. I can also erase, read and write flash pages, but any attempt to write a file fails with a timeout. Rebooting doesn't help. This device has been working well, and I had been reading and writing to Storage, but it seems that something is out of alignment!
process.memory()
={ free: 2490, usage: 75, total: 2565, history: 50,
gc: 0, gctime: 3.69262695312, blocksize: 16, stackEndAddress: 536928984, flash_start: 0,
flash_binary_end: 396828, flash_code_start: 1610612736, flash_length: 524288 }
require("Flash").getFree()
=[
{ addr: 397312, length: 86016 }
]
require("Storage").getFree()
=4194304
require("Flash").read(8,397312)
=new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255])
require("Flash").write("hello",397312)
=undefined
require("Flash").read(8,397312)
=new Uint8Array([104, 101, 108, 108, 111, 255, 255, 255])
require("Storage").list()
=[ ]
require("Storage").write("test.dat","hello")
Uncaught InternalError: Timeout on jshFlashWrite
at line 1 col 44
require("Storage").write("test.dat","hello")
1 Attachment