Not do extern unsigned int jsVarsSize; (as someone might be tempted to change it on the fly!). Instead just make it an argument to jsvInit if VARIABLES_MODE_MALLOC is set?
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.
Thanks! Looks good!
Do you think you could:
extern unsigned int jsVarsSize;
(as someone might be tempted to change it on the fly!). Instead just make it an argument tojsvInit
ifVARIABLES_MODE_MALLOC
is set?variables_mode
or changescripts/build_platform_config.py
, but instead just addDEFINES+=-DVARIABLES_MODE_MALLOC
like this: https://github.com/espruino/Espruino/blob/ESP32-v3.0/boards/PUCKJS.py#L44I'm happy to make those changes if you want me to though.