The thing in the code that kills is - I guess - DMP_MEMORY. I did not investigate what and how it is used, but a similar approach put me out of memory (describing the PacMan Maze/Board... I resorted to a custom encoding and some processing (post #3) to create the runtime structure and values out of it with 'auto-delete' of the 'source' - inplace/replace with this.x = processed(this.x);)... DMP_MEMORY is about 6K - from originally about 12K - of your 20K .md code. Does that sound about right?
If you can compress/pack this information and use initialization code to unpack and remove, that could help. --- Is and always will be true: memory * cycles = C (C is mystery, but 'constant').
@tve was exploring - AND ENABLING - other options to get more memory: write certain things into the unused flash pages and get them - in this case whole modules - at runtime on demand from there. Same approach is taken to store other big junks, such as certificates for SSL/encryption/...
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.
The thing in the code that kills is - I guess -
DMP_MEMORY
. I did not investigate what and how it is used, but a similar approach put me out of memory (describing the PacMan Maze/Board... I resorted to a custom encoding and some processing (post #3) to create the runtime structure and values out of it with 'auto-delete' of the 'source' - inplace/replace withthis.x = processed(this.x);
)...DMP_MEMORY
is about 6K - from originally about 12K - of your 20K .md code. Does that sound about right?If you can compress/pack this information and use initialization code to unpack and remove, that could help. --- Is and always will be true:
memory * cycles = C
(C is mystery, but 'constant').@tve was exploring - AND ENABLING - other options to get more memory: write certain things into the unused flash pages and get them - in this case whole modules - at runtime on demand from there. Same approach is taken to store other big junks, such as certificates for SSL/encryption/...