As the title says... Chat on...

User avatar
By cwr
#59355 I'm getting an error message
Code: Select all> dofile("main.lua")
E:M 2568
not enough memory
stack traceback:
   [C]: in function 'dofile'
   stdin:1: in main chunk
>

and I can't find E:M 2568 listed anywhere in the NodeMCU docs or code.
Does anyone know of a list of error messages anywhere?

Thanks - Will
User avatar
By marcelstoer
#59364 I suspect this one is from Lua itself. You may run 'grep -r "not enough memory" *' to check the code base for alternatives, though.

https://github.com/nodemcu/nodemcu-firm ... lmem.h#L20 declares a constant MEMERRMSG for that which is used in app/lua/ldo.c and app/lua/lstate.c.
User avatar
By cwr
#59375 Yup, there are a number of 'not enough memory' strings in NodeMCU, once I looked for them ...
Further, E:M turns up in the ESP SDK libmain.a, but I haven't tracked down the sources for that;
I don't think they exist.

The actual problem seems to be that with plenty of heap apparently available the source file
is still too large to fit in memory. I need to find a more accurate reading of available memory,
since adding or removing one 5-line function crashes the program with any one of a variety
of error numbers.

Thanks for the help - Will