Skip to content
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

ESP32 sketch data upload for FAT file system #3230

Closed
thedub2001 opened this issue Sep 19, 2019 · 12 comments
Closed

ESP32 sketch data upload for FAT file system #3230

thedub2001 opened this issue Sep 19, 2019 · 12 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@thedub2001
Copy link

thedub2001 commented Sep 19, 2019

Arduino ESP32 filesystem uploader for FAT partition needed !

I discovered the FAT file system on ESP32 and compared performances with SPIFFS file system :

Using SPIFFS file system and SPIFFS_test sketch (serial output) :

Testing file I/O with /test.txt
writing................................................................
1048576 bytes written in 60708 ms
reading................................................................
1048576 bytes read in 830 ms≤

Using FAT file system and Ffat_test sketch (serial output) :

Testing file I/O with /test.txt
writing................................................................
1048576 bytes written in 13498 ms
reading................................................................
1048576 bytes read in 259 ms

It appears that FAT writing is 4,5 times quicker than SPIFFS writing
and FAT reading is 3 times quicker than SPIFFS reading

That's why I'am planning to use FAT file system because it's quicker and because the ESP-IDF uses it natively.

The only thing missing is a way to upload a file system like the "ESP32 Sketch Data Upload" plugin found at https://github.com/me-no-dev/arduino-esp32fs-plugin

Hardware:

Board : ESP-WROOM-32 Dev Module
Core Installation : 1.0.3
IDE name : Arduino IDE

@thedub2001 thedub2001 changed the title ESP32 sketch data upload for fFAT ESP32 sketch data upload for FAT file system Sep 19, 2019
@lbernstone
Copy link
Contributor

@thedub2001
Copy link
Author

Thanks for your quick answer!
The tool looks complete, is there a possibility to turn it as a plugin ?

@lbernstone
Copy link
Contributor

Sure. Are you offering?

@thedub2001
Copy link
Author

thedub2001 commented Sep 19, 2019

No sorry 😃
I just wanted to point out the need for this tool !
Thanks a lot for your work!!

@zekageri
Copy link

Ah i wanted to switch to FATFS so bad but because there are no plugins for it for arduino ide or PlatformIO i just can't use it. :( If there was a way to upload files to FATfs from browser like with SPIFFS i would be fine with that too.
Btw i have an ESP with 16MB flash and with SPIFFS it is slow A.F. I had to reduce the SPIFFS size to 1mb to work properly.

@stale
Copy link

stale bot commented Nov 24, 2019

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Nov 24, 2019
@stale
Copy link

stale bot commented Dec 8, 2019

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Dec 8, 2019
@marcmerlin
Copy link
Contributor

@thedub2001 sorry, the tool I published only works on linux (and I didn't write it, I just packaged it). For a plugin it should have to be done in java I think.
Obviously it fixes my problem, and I have had other things to keep me busy. Hopefully someone else can do this for the java IDE.

@magicmicros
Copy link

I just wrote a small python script to generate a filesystem e.t.c.
Should work on all platforms.
https://github.com/magicmicros/mk_espfat

@lbernstone
Copy link
Contributor

@magicmicros : Your script will not work on esp32, as it does not include the wear levelling layer, used by the fatfs components.

@magicmicros
Copy link

I'm afraid you're mistaken, it's been working beautifully for a couple of weeks on a number of ESP32 boards.
The wear levelling might come into play AFTER a system has been created.
The initial filesystem will always be "clean".
I haven't read up on the wear levelling, but I'm pretty sure it's all done "outside" FAT, otherwise it would not be a FAT filesystem anymore.

There is no difference between the regular FFat.format() and the way I create the filesystem.
Well, except for my code not needed to to the same size calculations that the regular format does.

@lbernstone
Copy link
Contributor

very interesting. I'll see what I can do about a plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

5 participants