Most recent activity
-
-
Hi!
I want to upload a file (big binary) to extranal Flash at a specific start address (0x0000...) in Web Ide, and i don't want do this with File Storage.
Can i use these apis just likerequire("Flash").write(data, addr)
andE.pipe(source, destination, options)
?Will this work?Can some one give how to do it?
thanks -
- 3 comments
- 142 views
-
This function returns a memory-mapped String that points to the actual memory area in read-only memory, so it won't use up RAM...If you evaluate this string with eval, any functions contained in the String will keep their code stored in flash memory.
https://github.com/espruino/Espruino/blob/master/src/jswrap_storage.c#L92It seems that
require("Storage").read
actually accessing the data directly from flash in bangle with RAM less.
But,i saw the post https://forum.espruino.com/comments/15009857/Gordon
Sadly no, it has to load into RAM (at least at the moment) since the flash is external. It does it in the idle loop though so can make use of a bunch of execution stack and save using as much program memory.So, I confused about
require("Storage").read
RAM less or RAM moreAnother confusing thing is the returned data between
require("Storage").read
withA string of data
andrequire("Flash").read
withA Uint8Array of data
, whitch from extranal flash both.thx!
I'm sorry, i'm late! @fanoush Thx for your reminder, i had a LENOVO HX03, and spent some time to learn stuff, flash, page, pipe etc... and tested your dsd6 init file ;-) worked fine, lots of help!
And i found a problem will brick my device when i used the following code on Webide's left sides:
require("Flash").read(1,'0x60400000')
The log:
As the address '0x60400000' is not exist, may be ??
Fortunately, the lower battery ;-) you know.