marcelstoer / docker-nodemcu-build

Docker image to build NodeMCU firmware for the ESP8266 on your machine
https://hub.docker.com/r/marcelstoer/nodemcu-build/
MIT License
128 stars 63 forks source link

How do I compile LUA scripts into the NodeMCU firmware? #71

Closed GarMingLi closed 4 years ago

GarMingLi commented 4 years ago

I compiled the nodemcu firmware in a Docker environment and burned it into modules.I wrote a LUA script using ESPlorer, and after debugging, I wanted to compile it into firmware.Just add the LUA script file to the "\nodemcu-firmware\local\fs" path. After recompiling, no new firmware will be generated and the compilation fails.The compilation information is as follows:

Segmentation fault
Makefile:74:recipe for target 'spiffsscript' failed
make[1]: *** [spiffsscript] Error 139
make[1]: Leaving directory '/opt/nodemcu-firmware/tools'
Makefile:348:recipe for target 'spiffs-image' failed
make: *** [spiffs-image] Error 2

Before I compiled, I enabled the configuration in the user_config.h file:

#define BUILD_SPIFFS
#define SPIFFS_FIXED_LOCATION        0x100000
#define SPIFFS_MAX_FILESYSTEM_SIZE    0x20000
#define SPIFFS_SIZE_1M_BOUNDARY

How can I compile LUA script files into the firmware?

marcelstoer commented 4 years ago

To create an LFS image see https://github.com/marcelstoer/docker-nodemcu-build#create-an-lfs-image-for-esp8266.