-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NodeMCU 3.0 spiffsimg not working? #2943
Comments
Can confirm, on 043046d spiffsimg is not created when files available on |
Alex, the reason that I've put my name against this is that I'll fix this in my next push to dev. |
@KT819GM Thank you for taking the time to read and comment. I have pulled the commit you suggested from dev branch, left the @TerryE Thank you for your comment. So am i to assume that the issue is not me? Any idea on the time frame for your next push to dev? |
I am now attempting to do the same thing with NodeMCU 3.0 but I am having 2 problems. Firstly, I cannot get the ‘make’ process to generate the spiffsimg file. What do I need to do to get this to generate The same question as you, |
@albarrett @KT819GM @momkey02 fixing this is stalled on #2960. More feedback needed, please. |
@TerryE, this issue randomly came up so i thought i would just check on progress, as this issue is still open i assume the issue is still ongoing? I spotted post #3066 about a new master release and was hoping this fix would be included in that release, do you know if thats going to be the case? Would be great to be able to finally use 3.0, im still using 2.2.1 whilst waiting for this to be resolved. Thanks. |
Ahhh, mea culpa, and almost 10 months since the issue was already logged. I will put this fix in next. Sorry guys. This also cuts across #3147, so I would prefer to sort out this issue of harmonising firmware and host spiffs within a single thread of discussion and one PR. The scope of this will be:
|
@TerryE I've met this problem everytime I tried to build a nodemcu firmware. And I don't know another way to place the local/fs and local/lua files in the esp8266 mcu. So would you please tell me another way to manually do that? All I want to know is the way to place "init.lua" and other files into the mcu without using the "file" API. I just want to flash the esp8266 mcu with the node-firmware I built and upload all files I needed into that mcu using the same flash tool. So would you teach me that please? Thank you so much! It bothered me for such a while... |
@zxsoft: What, specifically, is your issue? I just tried on
I'd expect to be able to pass (ETA: I usually do this quite by hand rather than using the in-tree |
@nwf Thanks a lot for your reply! I used a docker build environment, the image name was "marcelstoer/nodemcu-build", the node-firmware git commit hash on which I used was ”136e09739b835d6dcdf04034141d70ab755468c6“. I cloned the nodemcu/nodemcu-firmware using the above commit hash on github, without editing any files. I then added two files, "local/fs/fs.lua" and "/local/lua/lua.lua", and write a “print('hello world')" line in each of them. Then, I run "make" command. It successfuly generated two files 0x00000.bin and 0x10000.bin in the bin directory. I flashed the image into esp8266, the nodemcu-firmware worked very well but I didn't find the two files I added. I've just tried your suggested command "make spiffs-image”, but seems something went wrong:
Then I checked the directory you mentioned, and found that there was indeed a LFS.img file in the local/fs directory (Which didn't appear when I just use the make command, or using the "build" script provided by the docker image), so does that mean I can ignore the error messages above? There was also the file "tools/spiffsimg/spiffsimg", but it's an executable program file, not an SPIFFS image. I wanted to list the files in the LFS.img to check wether it's a good image.So I used the command:
and got an error:
So I dought the file was not generated successfully. The size of LFS.img file is 279Byte. I don't know how to deal with the LFS.img file. Should I flash the LFS.img manually into the esp8266 mcu? When I use the "build" script the docker image provided, there will be four files in the bin directory.
The code to build the extra two files in the "build" script is:
What I really wanted is to pre-build "local/fs" files into the all-in-one image "nodemcu_float_release_20210228-1437.bin", especially the "init.lua" file. So I can flash the image and get the esp8266 mcu ready to run as soon as it's been powered up. I worked hard on this for a while but not managed to get it done. So I'm very looking forward to your help. Thank you so much! |
@nwf I read you "ETA" section and very interested in the way you manage the firmware tree. So how are you doing that? If I want to flash the file system in to esp8266 mcu using download tool (not using Esplorer IDE or the file API to write init.lua file in it), what's the best practise? |
https://github.com/cmukgb/ctfws-timer-iot/blob/master/README-flashing.rst is the closest thing I have to a writeup of the process I use; there may some rough spots. And yes, sorry, you're absolutely right that In principle an all-in-one file should be constructable; presumably, it looks like "concatenate the firmware image, some padding, the filesystem image, some more padding, and then the esp-init data" but I suspect you'll be better off (it'll be a little faster) using the multiple files and the Hope that helps! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@zxsoft 你的好了吗?你如何解决的?我这边也需要将lua代码写入bin中,3.0貌似有问题 |
Please bear with me, I don’t know if this is an issue with NodeMCU or me! I have been in touch with @TerryE regarding this trying to understand the issue but have yet to find a solution.
I have been using my own Linux build environment for NodeMCU 2.2 for a while and the process would generate 3 files, 2 bin files and a spiffsimg file. I could then flash all 3 of these files to my ESP8266 using esptool and all the files I had put into local/fs folder would be available on the device.
I am now attempting to do the same thing with NodeMCU 3.0 but I am having 2 problems.
Firstly, I cannot get the ‘make’ process to generate the spiffsimg file. What do I need to do to get this to generate?
Secondly, if I create this file manually using the spiffsimg tool, when I flash it to the device as I did with 2.2 the device doesn’t see any files in its file structure. However, if I take this img file and flash it using bin files from a 2.2 build the files can be seen and used, which is why I am questioning if there is an issue with 3.0 or me?
I am aware there is the new partition tool that I can use, but if possible, I would like to stick to the same workflow I was using for 2.2 for several reason I won’t bore you with.
Any assistance on the above would be greatly appreciated.
Expected behavior
View and use text and HTML files from spiffsimg file I have generated and flashed onto the device.
Actual behavior
Flashing the img file is successful, however, no files can be seen or used. Device formats its own blank filesystem, as if the img files doesn’t exist, which I can upload files to.
Test code
N/A
NodeMCU version
Master branch (NodeMCU 3.0)
Hardware
ESP8266-12S dev board
The text was updated successfully, but these errors were encountered: