Having problems with spiffs not mounting anymore
Having problems with spiffs not mounting anymore
I am having a "strange" issue arise that has not appeared before.
My projects are created in vscode running the esp-idf extension.
Several projects use Spiffs and have been working fine.
Today I was working on a particular project and it was fine. I then switched to a wifi project and as soon as I attempted to browse to the url for the ESP, I get a spiffs not mounting error (the route path handler sets up spiffs).
So, I then go back to my other project that also uses spiffs and now that also has a spiffs error. I erased the flash and rebuilt and then it formatted the spiffs. So I built again and it still does not mount spiffs.
I copied a project to home and ran it ok, spiffs is fine. Then copied back to my office machine an spiffs issue appeared again. I tried on my own hardware (using WROOM) and also on the dev kit with WROVER. Both have same problem.
I uninstalled and reinstalled both vscode and esp-idf but cannot get rid of the problem.
The very first time I had any issues with spiffs was yesterday when the esp-idf extension was updated.
Thanks for any help to fix it or ideas to debug the issue and see what is causing this.
My projects are created in vscode running the esp-idf extension.
Several projects use Spiffs and have been working fine.
Today I was working on a particular project and it was fine. I then switched to a wifi project and as soon as I attempted to browse to the url for the ESP, I get a spiffs not mounting error (the route path handler sets up spiffs).
So, I then go back to my other project that also uses spiffs and now that also has a spiffs error. I erased the flash and rebuilt and then it formatted the spiffs. So I built again and it still does not mount spiffs.
I copied a project to home and ran it ok, spiffs is fine. Then copied back to my office machine an spiffs issue appeared again. I tried on my own hardware (using WROOM) and also on the dev kit with WROVER. Both have same problem.
I uninstalled and reinstalled both vscode and esp-idf but cannot get rid of the problem.
The very first time I had any issues with spiffs was yesterday when the esp-idf extension was updated.
Thanks for any help to fix it or ideas to debug the issue and see what is causing this.
-
- Posts: 364
- Joined: Mon Jan 04, 2021 2:06 pm
Re: Having problems with spiffs not mounting anymore
Hi,
You are duplicating here: viewtopic.php?f=40&t=20721&p=75890&hilit=SPIFFS#p75890
Please, inform the ESP-IDF version you're using and some log from the monitor.
You are duplicating here: viewtopic.php?f=40&t=20721&p=75890&hilit=SPIFFS#p75890
Please, inform the ESP-IDF version you're using and some log from the monitor.
-
- Posts: 364
- Joined: Mon Jan 04, 2021 2:06 pm
Re: Having problems with spiffs not mounting anymore
According to your project attached on the other post, you are missing the definition of the csv file.
and you need also to change the flash memory size. Here the code works!
Code: Select all
#
# Partition Table
#
# CONFIG_PARTITION_TABLE_SINGLE_APP is not set
# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y
# end of Partition Table
and you need also to change the flash memory size. Here the code works!
Code: Select all
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
Re: Having problems with spiffs not mounting anymore
The project uses WROOM32 with 4MB of flash.
I set the flash memory size in the config in vscode to 4MB.
Why would 3 different projects all start having issues with spiffs. Is there a setting in vscode that is independent?
Yesterday a colleague remote logged into my office machine to take a look. "Mysteriously" the issue did not occur when we ran the projects.
Today I had been working all day on one of the projects no problem. Then later in the day I started working on another project that uses spiffs for wifi during root route handling. The code compiled fine but as I navigated to the route (where spiffs is initialialized) I got a spiffs mount failure. I then closed the project and re-opened the one I had been working on all day without issue and now spiffs in that project stopped too. So, I erased the flash, did a full clean and re-flash but cannot get the spiffs to work any more.
I took the wifi code project home and ran on other hardware on my home machine and spiffs works fine (using the same code and config file with same flash size settings)
Next, I uninstalled vscode and esp-idf and installed again from scratch. I cleaned out my folder and renewed the project files pulling in from git. Still I cannot get spiffs running again.
I don't understand why the problem went away when someone remoted in and I watched as he simply looked at the config without changing it, save and re-build and flash. And, why it has worked all day and only stopped when I ran the wifi project (which works fine at home) and after this, none of the projects using spiffs will mount properly.
Maybe, something happened to the ESP flash that erase does not repair but something else does?
Really stumped here.
Attached shows my flash size and partition definition settings
I set the flash memory size in the config in vscode to 4MB.
Why would 3 different projects all start having issues with spiffs. Is there a setting in vscode that is independent?
Yesterday a colleague remote logged into my office machine to take a look. "Mysteriously" the issue did not occur when we ran the projects.
Today I had been working all day on one of the projects no problem. Then later in the day I started working on another project that uses spiffs for wifi during root route handling. The code compiled fine but as I navigated to the route (where spiffs is initialialized) I got a spiffs mount failure. I then closed the project and re-opened the one I had been working on all day without issue and now spiffs in that project stopped too. So, I erased the flash, did a full clean and re-flash but cannot get the spiffs to work any more.
I took the wifi code project home and ran on other hardware on my home machine and spiffs works fine (using the same code and config file with same flash size settings)
Next, I uninstalled vscode and esp-idf and installed again from scratch. I cleaned out my folder and renewed the project files pulling in from git. Still I cannot get spiffs running again.
I don't understand why the problem went away when someone remoted in and I watched as he simply looked at the config without changing it, save and re-build and flash. And, why it has worked all day and only stopped when I ran the wifi project (which works fine at home) and after this, none of the projects using spiffs will mount properly.
Maybe, something happened to the ESP flash that erase does not repair but something else does?
Really stumped here.
Attached shows my flash size and partition definition settings
- Attachments
-
- flash size.png (37.25 KiB) Viewed 14914 times
-
- partition assign.png (106.22 KiB) Viewed 14914 times
-
- Posts: 364
- Joined: Mon Jan 04, 2021 2:06 pm
Re: Having problems with spiffs not mounting anymore
That's odd. No clue about it.
I'll test again, but here it seems to work with no problem.
I'll test again, but here it seems to work with no problem.
Re: Having problems with spiffs not mounting anymore
I don't know what to try next.
At home the code runs fine on the ESP32 WROVER 4 kit.
I brought the kit to the office this morning, moved my project to a completely new folder, rebuilt the code and again I get the spiffs error, on the hardware that works at home using the code that works at home.
So, I have tried on my own custom hardware running WROOM and 2 Development kits running WROVER and all 3 hardware have the spiffs error. And, I have tried several projects that have had NO problems with spiffs and now ALL of them have spiffs issue.
If the problem is not in the hardware of the firmware then what externally can interfere with spiffs ON THE CHIP?
As I first mentioned, this issue ONLY started to appear straight after ESP-IDF vscode extension was updated to v1.0.3 and I cannot see how this affects spiffs???
One thing I do note that I did not see in past is that when I click on icon in vscode to do full clean I get an "ebusy:resource busy or locked" error as attached.
At home the code runs fine on the ESP32 WROVER 4 kit.
I brought the kit to the office this morning, moved my project to a completely new folder, rebuilt the code and again I get the spiffs error, on the hardware that works at home using the code that works at home.
So, I have tried on my own custom hardware running WROOM and 2 Development kits running WROVER and all 3 hardware have the spiffs error. And, I have tried several projects that have had NO problems with spiffs and now ALL of them have spiffs issue.
If the problem is not in the hardware of the firmware then what externally can interfere with spiffs ON THE CHIP?
As I first mentioned, this issue ONLY started to appear straight after ESP-IDF vscode extension was updated to v1.0.3 and I cannot see how this affects spiffs???
One thing I do note that I did not see in past is that when I click on icon in vscode to do full clean I get an "ebusy:resource busy or locked" error as attached.
- Attachments
-
- ebusy.jpg (28.37 KiB) Viewed 14869 times
Re: Having problems with spiffs not mounting anymore
Are you flashing the spiffs partition with an image? Have you compared those binary images?
Re: Having problems with spiffs not mounting anymore
Some projects are flashing image to spiffs and others are not.
Also, how do you "compare" images?
Also, how do you "compare" images?
Re: Having problems with spiffs not mounting anymore
Binary diff or hex editor or simple hash
Re: Having problems with spiffs not mounting anymore
I cannot read anything in spiffs, how can I compare the image in folder to spiffs?
BTW: I was wrong, my projects do have images that get copied into flash.
I just ran the esp example spiffs project and it failed to mount but then formatted the flash and runs ok.
Then I went back to my project but spiffs fails again.
Next, I created a new project that mounts spiffs but not flash image and when this runs it formats the spiffs and then mounts ok.
So, it seems the issue has to do with projects that are copying images into spiffs.
Has anything changed in the cmakelists function for flashing images?
BTW: I was wrong, my projects do have images that get copied into flash.
I just ran the esp example spiffs project and it failed to mount but then formatted the flash and runs ok.
Then I went back to my project but spiffs fails again.
Next, I created a new project that mounts spiffs but not flash image and when this runs it formats the spiffs and then mounts ok.
So, it seems the issue has to do with projects that are copying images into spiffs.
Has anything changed in the cmakelists function for flashing images?
Who is online
Users browsing this forum: No registered users and 227 guests