Is this mainly for ESP32 usage? I can't imagine many other devices where this makes too much sense? Using external flash would be neat but you'd have to be able to supply external read/write functions too.
But I guess possibly it could be done, although right now none of the functions take an instance parameter so doing require("storage", options) is nontrivial. There is already code in there to handle two flash areas, and usage of C:filename to force where data is stored - I guess making the address of the second area configurable would be possible - but I wonder whether this would be any more useful than if it were just configured for and baked into the firmware?
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.
Is this mainly for ESP32 usage? I can't imagine many other devices where this makes too much sense? Using external flash would be neat but you'd have to be able to supply external read/write functions too.
But I guess possibly it could be done, although right now none of the functions take an instance parameter so doing
require("storage", options)
is nontrivial. There is already code in there to handle two flash areas, and usage ofC:filename
to force where data is stored - I guess making the address of the second area configurable would be possible - but I wonder whether this would be any more useful than if it were just configured for and baked into the firmware?