nodemcu / nodemcu-firmware

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

Lua error: stdin:1: system restarting #3442

Closed vidalouiswang closed 2 years ago

vidalouiswang commented 3 years ago

Expected behavior

"lfs.img" loaded successfully.

Actual behavior

error

Test code

Following with the example at https://nodemcu.readthedocs.io/en/release/getting-started/#minimal-lfs-example Only one line in the "hello_world.lua": print("Hello ESP8266 world!") "_init.lua" and "dummy_strings.lua" have been included in the "lfs.img".

Here are debug info from serial:

node.LFS.reload("lfs.img"); node.LFS.reload("lfs.img"); Lua error: stdin:1: system restarting stack traceback: [C]: in field 'reload' stdin:1: in main chunk [C]: in ? [C]: in ? � ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 28596, room 16 tail 4 chksum 0x20 load 0x3ffe8000, len 2608, room 4 tail 12 chksum 0xae ho 0 tail 12 room 4 load 0x3ffe8a30, len 8, room 12 tail 8 chksum 0xca csum 0xca �r��nl�l�l�n~b�b��nrn�n~b $l � $ �nn�nn���~� �nn���~�b �nn�����n�r��n|� l�lb brl�nb�n l�rl�l� l�rl�l� l�rl $� llrl$rl�bb njb�bpr �br lb�n'nn� lbl�� ll ll� �� l$�n�2bb ll $� b �2bb l �brlr Erasing LFS from flash addr 0x0ae000..... to 0x0edfff LFS image loaded

NodeMCU 3.0.0.0 branch: release commit: d4ae3c364bd8ae3ded8b77d35745b7f07879f5f9 release: 3.0.0-release_20210201 +1 release DTS: 202105102018 SSL: false build type: float LFS: 0x40000 bytes total capacity modules: adc,coap,crypto,encoder,file,gpio,http,i2c,mdns,net,node,pwm,rtcfifo,rtcmem,rtctime,sjson,sntp,spi,tmr,uart,websocket,wifi build 2021-06-01 00:56 powered by Lua 5.3.5 on SDK 3.0.1-dev(fce080e)

NodeMCU startup banner

NodeMCU 3.0.0.0 branch: release commit: d4ae3c364bd8ae3ded8b77d35745b7f07879f5f9 release: 3.0.0-release_20210201 +1 release DTS: 202105102018 SSL: false build type: float LFS: 0x40000 bytes total capacity modules: adc,coap,crypto,encoder,file,gpio,http,i2c,mdns,net,node,pwm,rtcfifo,rtcmem,rtctime,sjson,sntp,spi,tmr,uart,websocket,wifi build 2021-06-01 00:56 powered by Lua 5.3.5 on SDK 3.0.1-dev(fce080e)

Hardware

NodeMCU ESP8266 4MB.

vidalouiswang commented 3 years ago

Sorry using wrong compiler.

vidalouiswang commented 3 years ago

Although "lfs.img" could be loaded successfully, but there still an error after "node.LFS.reload("lfs.img")".