I'm looking into the saving of code into flash. I see the stuff in jswrap_flash.c which uses a special area that is statically defined. Is there a way to make this a bit more dynamic because esp8266's come with different flash memory sizes and it would be a shame to have to define different boards just for this.
Related question, would it be possible to execute JS programs directly from "read-only" memory? In the esp8266 a big chunk of the flash is memory mapped, so the program code could be written to flash but be readable like normal memory. There are some 4-byte alignment constraints I'd have to look into. This would mean that programs don't have to be loaded into RAM and use space there before being executed.
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 looking into the saving of code into flash. I see the stuff in
jswrap_flash.c
which uses a special area that is statically defined. Is there a way to make this a bit more dynamic because esp8266's come with different flash memory sizes and it would be a shame to have to define different boards just for this.Related question, would it be possible to execute JS programs directly from "read-only" memory? In the esp8266 a big chunk of the flash is memory mapped, so the program code could be written to flash but be readable like normal memory. There are some 4-byte alignment constraints I'd have to look into. This would mean that programs don't have to be loaded into RAM and use space there before being executed.