-->
Page 1 of 1

Moving from Lua to C

PostPosted: Fri Jan 20, 2017 2:44 pm
by alex_g
So far all the development I've done on NodeMCU devkits has been in Lua. It's absolutely great for prototyping but space restrictions are starting to rear their ugly heads.

I know that my main project will eventually have to be all in C, but how do I go about easing into the experience?

For instance, for starters I'd like to augment the math floating point routines, add trigonometric and transcendental functions, and then perhaps move some of my more intensive Lua math routines to C. It would actually be ideal if I move all my routines to C and still keep the Lua environment for scripting... but that will depend on code size.

So what I want to ask, is there any introductory material on C programming for ESP8266? What compilers are there? GCC? Arduino? I work in a Linux environment, so it's best if it's not Windows unless absolutely necessary.

I also need to find the details of the Lua C interface and its implementation. What are all the different RAM types, and how are they used. Are C files written out the same way as Lua or is it a different file system? Stuff like that... Any information or pointers greatly appreciated.

Thanks guys and gals.

Re: Moving from Lua to C

PostPosted: Fri Jan 20, 2017 3:47 pm
by alex_g
Hey! I just found the How to set up manually the GCC toolchain and SDK section.
Don't know how I missed it before.

Is there anything else I should know? Pointers, tutorials, etc?