-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
LittleFS multiple partition mounting/reading/writing problem #8581
Comments
Have you tried erasing all flash and reprogramming? When changing partition definitions it's necessary to write the entire flash. Unrelated: I would expect the coredump to be at the end of flash. |
Yes, i have erased my flash. It is mounting correctly. |
I can read from sysFS but can't write to it and i can't read or write to userFS |
@zekageri - Do you mind trying it with Arduino IDE + Arduino Core 2.0.11? |
Well, if i have to i can install it. |
Works for me in arduino 2.0.11
partitions.csv
|
Thanks @lbernstone It may be an issue with the Platform IO Package. |
Or the partition csv? I will look again tomorrow. Thank you all for your help. |
Wait a minute. Did you try to read and write to the partitions? Thats whats not working for me |
Platformio has a bug when offset is not filled in partition scheme. |
I didn't run the full test suite, but I was able to write a file to both partitions. |
Ohh. Thats interesting. Will try it today. Thank you. |
Well, I have replaced my partition.csv
boolean systemPartitionMounted = sysFS.begin(false,"/system",10,"system");
boolean userPartitionMounted = userFS.begin(false,"/user",10,"user");
if( debug ){
logger.write("\n***** File System *****\n");
logger.write("%s\n",systemPartitionMounted?"System partition is mounted":"System partition is not mounted");
logger.write("Size: %d byte\n",systemPartitionMounted?sysFS.totalBytes():0);
logger.write("Used: %d byte\n",systemPartitionMounted?sysFS.usedBytes():0);
logger.write("***** ********** *****\n");
logger.write("%s\n",userPartitionMounted?"User partition is mounted":"User partition is not mounted");
logger.write("Size: %d byte\n",userPartitionMounted?userFS.totalBytes():0);
logger.write("Used: %d byte\n",userPartitionMounted?userFS.usedBytes():0);
logger.write("***** ********** *****\n\n");
}
if( userPartitionMounted ){
if( !write("/test.txt","test") ){ return; }
char buffer[1024];
if( read("/test.txt",buffer,1024) ){
logger.write("%s\n",buffer);
}
} Log
With this csv, it can not mount sysFS partition and i also can not write to userFS partition. |
I have upgraded my csv to match to a 16mb wrover
I have no warnings or errors during compilation regarding the csv.
|
Also it seems to me that PIO file system upload ( with data folder contents ) is picking the last spiffs subtyped partition to load the data. And i can read from there. If the user partition is the last, i can read from there but if i replace it with the "system" partition i can only read from there. |
But how can i add my custom partition in Arduino IDE? |
So after i erased the flash, filled out the offsets in the partition table and uploaded firmware and flash again, it is working fine now. I tested only one partition for now but i will test the other too soon. Thank you all for your help and support. This was a quick help from you guys!! |
And i had to swap the user and system partitions in a way that the system partition would be the last so the PIO file system uploader uploads my data folder content to this partition. |
Here is my test partition for now.
|
All good just the litttlefs updater missing with optional partition. ;D there is only spiffs updater |
Board
ESP32 Wrover
Device Description
ESP32_Wrover 16mb flash 8mb psram
Hardware Configuration
Ethernet
Version
latest master (checkout manually)
IDE Name
Platformio
Operating System
Windows10
Flash frequency
80
PSRAM enabled
yes
Upload speed
115200
Description
I made a custom partition table to separate system files and user configuration files in the flash.
I then mounted these two partitions separtely and tried to write and read from one of them.
Sketch
Debug Message
Other Steps to Reproduce
Partition.csv
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: