nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.68k stars 3.13k forks source link

Making the lua component more standalone #3641

Open jonsmirl opened 9 months ago

jonsmirl commented 9 months ago

For my application I just need lua as a component in a larger ESP app. Initially I started off by directly porting the standard lua source and got tied up in console problems, so I turned to nodemcu where again I hit console problems (which are being fixed!).

What I am looking for is to turn lua into a component in the Espressif registry. https://components.espressif.com/ Nodemcu would continue to exist but instead it would just use the yaml file to get the lua component from the ESP registry instead of having it in the local tree. This method also makes it easy to pick the lua version you want via the yaml file.

I've hacked around on this in my local tree trying to construct this, some observations....

base_nodemcu. I don't think this should be a component, instead it should be the 'main' directory for a standalone nodemcu app.

embedded_lfs. Not sure how to use this. Do I need it on esp32? I am using this in cmake to prepopulate spiffs spiffs_create_partition_image(spiffs ../scripts FLASH_IN_PROJECT) Not sure how this is different than prepopulating the spiffs.

platform -- would need to be merged into the lua component?

modules - a few things in here (pipe) would need to be moved into the component.

task - would move into the component

uzlib -- is this only for host lua?

I also hacked around to remove u8g2 and ucg and replaced them with lvgl from the ESP component library.


The goal of this is to decouple lua from the rest of nodemcu so that it can be stored in the ESP component library. Thoughts on how to proceed?