Skip to content

Creating tables on 4MB SPIFFS #101

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

Closed
van-deste opened this issue Feb 17, 2025 · 10 comments
Closed

Creating tables on 4MB SPIFFS #101

van-deste opened this issue Feb 17, 2025 · 10 comments

Comments

@van-deste
Copy link

van-deste commented Feb 17, 2025

No description provided.

@van-deste van-deste closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2025
@van-deste van-deste changed the title Disk I/O error when creating a table on SPIFFS with 24 columns Creating tables on 4MB SPIFFS Feb 24, 2025
@van-deste
Copy link
Author

van-deste commented Feb 24, 2025

Apologize for creating and closing the issue. I have an error and I cannot understand what was happening.

I have a new error. In my ESP32, I have 4MB of SPIFFS created using a custom partition.
I need to create 3 tables, however I get a Disk I/O error.

Here is my sql to create the tables:

CREATE TABLE IF NOT EXISTS table1 ( field1 INTEGER, field2 TEXT, field3 TEXT, field4 TEXT, field5 INTEGER, field6 INTEGER, field7 TEXT, field8 TEXT, field9 TEXT, field10 BOOLEAN, field11 TEXT, field12 BOOLEAN, field13 TEXT, field14 BOOLEAN, field15 TEXT, field16 BOOLEAN, field17 TEXT, field18 BOOLEAN, field19 TEXT, field20 BOOLEAN, field21 TEXT, field22 BOOLEAN, field23 TEXT );

CREATE TABLE IF NOT EXISTS table2 ( field1 INTEGER, field2 INTEGER, field3 TEXT, field4 TEXT, field5 TEXT );

CREATE TABLE IF NOT EXISTS table3 ( field1 INTEGER, field2 INTEGER, field3 INTEGER, field4 TEXT );

I do not understand, why I get this error. Could anyone help me, please?
Thank you.

@van-deste van-deste reopened this Feb 24, 2025
@HankLloydRight
Copy link

I have a new error. In my ESP32, I have 4MB of SPIFFS created using a custom partition. I need to create 3 tables, however I get a Disk I/O error.

Just a longshot here, but SPIFFS has been deprecated for ages.
Have you tried using a LittleFS partition instead?

Are you sure your partition has free space?

@van-deste
Copy link
Author

Well, I did not know that...
I did not try to use LitleFS... is it simple to implement?

Yes my partition has space:
When creating the tables I do the follow:

Serial.printf("Total space: %d bytes\n", SPIFFS.totalBytes()); Serial.printf("Used space: %d bytes\n", SPIFFS.usedBytes());

And my serial monitor outputs the follow:
Total space: 3848081 bytes
Used space: 6502 bytes

@HankLloydRight
Copy link

Well, I did not know that...
I did not try to use LitleFS... is it simple to implement?

What IDE are you using? I'd just goggle or AI help on how to upgrade. It's almost plug-and-play but your code will need some minor changes.

@van-deste
Copy link
Author

I am using CLion IDE using the PlatformIO framework.
I will do the changes to implement LittleFS instead of SPIFFS and see if it resolves the problem

@HankLloydRight
Copy link

I'm not familiar with CLion IDE, but I am using VSC with PlatformIO, so you shouldn't have any issues.

You can always revert back to SPIFFS if you need to.
Good luck!

@van-deste
Copy link
Author

It is just a preference. I used to work with VSCode and PlatformIO, but I find CLion better for me. It is almost the same.
I will update you when I finish doing the changes.
Thank you for the fast response and your help.

@van-deste
Copy link
Author

@HankLloydRight problem solved. Thank you so much for your help!

@siara-cc
Copy link
Owner

@HankLloydRight Thanks!
Yeah there have been issues using this repo with SPIFFS
#50

@van-deste
Copy link
Author

I think we can close this issue. Thank you both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants