Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By hbouzas
#20027 I am re-compiling the NodeMCU LUA successfully as I am trying to package several LUA calls together and mix them with C API calls. Has anybody tried to call a NodeMCU LUA function like wifi.ap.getmac from C? Again, I am trying to mix C and LUA and the stuff compiles fine but it makes the module crash and go into a loop here is an example of the code I'm using:

void get_mac_add( lua_State* L)
{
lua_State* L;
lua_getglobal(L, "wifi.ap.getmac");
lua_pcall(L, 0, 1, 0);
const char * macadd = lua_tostring(L, -1);
INFO(macadd); // macro to print to UART
}

Any help will be much appreciated.
Thanks

Horacio.