The following works with pretokenization in Storage but not in RAM.
Oh, I would expect the opposite! With current tokenization the inline C as part of storage file could now have atob array automatically expanded and tokenized so the binary string with executable code may point to the flash memory instead of RAM.
could be fixed by inline compiler by generating something like var b="base64encodedstring";var bin=atob(b) or maybe bin=""+atob("xxx") or maybe atob("xxxx",true)
That snippet doesn't have static/global variables, so it should be fine anywhere. The crash is probably due to the IDE replacing unknown characters with ? when uploading.
bin=""+atob("xxx")
This would be best, the others would avoid the atob optimization.
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.
Oh, I would expect the opposite! With current tokenization the inline C as part of storage file could now have atob array automatically expanded and tokenized so the binary string with executable code may point to the flash memory instead of RAM.
could be fixed by inline compiler by generating something like
var b="base64encodedstring";var bin=atob(b)
or maybebin=""+atob("xxx")
or maybeatob("xxxx",true)