Chat about current Lua tools and IDEs

User avatar
By jankop
#70262 My lua program is too long and can not be translated by node.compile () for lack of memory. I needed to compile it in PC-Windows. I admit that I did not understand the recommended procedure https://nodemcu.readthedocs.io/en/master/en/upload/#compiling-lua-on-your-pc-for-uploading
I'm looking all day, but I can not find solution. Can anyone please describe me the procedure in detail? Thanx
User avatar
By jim121049
#70279 You can compile your Lua script on a PC to check syntax but according to the docs: "compiled output cannot run on the ESP8266" so that's not going to help with your problem. If it were me, I'd investigate dividing the program up into smaller modules, which are individually compiled, and then called using "dofile()".
User avatar
By jankop
#70289 Yes, but it is not all:
Simply change directory to the firmware root directoy and run the command:
lua tools/cross-lua.lua
This will generate a luac.cross executable in your root directory which can be used to compile and to syntax-check Lua source on the Development machine for execution under NodeMCU Lua on the ESP8266.