Open weskerfoot opened 1 year ago
against current dev branch, using build options LUA=53,
$ ./luac.cross -m 20480 -o local/fs/aa.img local/lua/*.lua
$ ./luac.cross -o local/fs/bb.img local/lua/*.lua
$ file local/fs/aa.img local/fs/bb.img
local/fs/aa.img: Lua bytecode, version 5.3
local/fs/bb.img: Lua bytecode, version 5.3
startup banner:
NodeMCU 3.0.0.0
branch: lua53
commit: fe31d6c0881811557da3869a8fae244342ee0657
release: 3.0.0-release_20211229 +12
release DTS: 202211082316
SSL: false
build type: float
LFS: 0x20000 bytes total capacity
modules: adc,bit,enduser_setup,file,gpio,i2c,mqtt,net,node,ow,rtcmem,rtctime,sjson,sntp,spi,tmr,uart,wifi
build 2022-11-09 02:03 powered by Lua 5.3.5 on SDK 3.0.1-dev(fce080e)
I am using that scenario every day and it works. You obviously are doing "int" and "regular" builds. each build also creates a matching luac.cross/luac.cross.int (They also create different bytecode)
I assume that your luac.cross is outdated as the compression feature was added in a second step. Just make sure to use the correct luac.cross that came with the FW build and it should be fine.
btw the -m option is not implemented for Lua 5.3 (it does nothing)
I see the problem now, I forgot to pass the -f
flag, but for some reason it still works if you just pass -m
which gives you a gzip file. Would it be acceptable if I changed that error message to be a bit clearer? E.g. "read error on LFS image file. Make sure you passed the -f flag" or something?
Expected behavior
According to the docs, this should result in a usable lfs.img
luac.cross.int -o lfs.img *lua
Which I can then load using
node.LFS.reload("lfs.img")
Actual behavior
The firmware requires it to be in a different format (for
uzlib_inflate
)I get this error (from this invocation) if I try running
print(node.LFS.reload("lfs.img"))
after uploading usingnodemcu-tool upload lfs.img
If I do
luac.cross.int -m 20480 -o lfs.img *lua
it works just fine and restarts as expected, because of the different format I assume.NodeMCU startup banner
NodeMCU-Tool version is
3.2.1
Hardware
Tested using https://learn.adafruit.com/adafruit-feather-huzzah-esp8266