>trace()
#1[r2,l1] Object {
... lots of stuff skipped ...
#58[r1,l2] Name String [2 blocks] "hello" #79[r1,l1] Function { return
#81[r1,l2] Name Param "t" undefined
#80[r1,l2] Name String [1 blocks] "\xFFcod" #138[r1,l1] String [5 blocks] "t1 = t.toUp
}
}
Doesn't this mean that the function "hello" uses just as much memory as if it had been normally loaded, or is #138 really all in flash and doesn't use any jsVars?
Is there a different trick that's eluding me here to get the code in "hello" to stay in flash? Or am I just confused?
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'm a bit confused about "executing out of flash memory" using E.memoryArea. Here's what I tried on an esp8266.
First write a simple function to flash memory and check that it's there:
Now eval it (I know I didn't need "ma"):
Now see what's in memory:
Doesn't this mean that the function "hello" uses just as much memory as if it had been normally loaded, or is #138 really all in flash and doesn't use any jsVars?
Is there a different trick that's eluding me here to get the code in "hello" to stay in flash? Or am I just confused?