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

use ESP-IDF's SPIFFS implementation #25

Merged
merged 1 commit into from
Feb 7, 2018
Merged

Conversation

boneskull
Copy link
Contributor

Using this and v0.2.1 of mkspiffs I was able to actually get SPIFFS working:

image

I'm unsure how to test this more thoroughly. Also: I haven't sent this much C in a PR to any project before; please be gentle. 😇


  • removes components/spiffs/
  • adds custom partition table
  • update block size as per ESP-IDF docs
  • updates sdkconfig with partition table and whatever else make menuconfig now stuffs in there
  • remove unused function esp32_duktape_spiffs_write

- removes `components/spiffs/`
- adds custom partition table
- update block size as per [ESP-IDF docs](https://esp-idf.readthedocs.io/en/latest/api-reference/storage/spiffs.html)
- updates `sdkconfig` with partition table and whatever else `make menuconfig` now stuffs in there
- remove unused function `esp32_duktape_spiffs_write`
@boneskull
Copy link
Contributor Author

I think maybe sdkconfig shouldn't actually be under VCS...? I think it can pull defaults from somewhere? We need to point it at the partition CSV afaik.

@nkolban nkolban merged commit 4e1a07b into nkolban:master Feb 7, 2018
@nkolban
Copy link
Owner

nkolban commented Feb 7, 2018

It has always been my belief that Pull Requests should be honored as quickly as possible. Too many projects suffer from pull requests just sitting in the queue without attention. My philosophy is to merge a pull request ASAP and if there is something wrong with it, we can always back it out later.

@boneskull boneskull deleted the new-spiffs branch February 7, 2018 20:41
@dashxdr
Copy link
Contributor

dashxdr commented Feb 10, 2018

I can almost get this working. I had to add a partitions.csv line
SPIFFS,data,SPIFFS,0x180000,0x80000,
The directory listing works and file stat + such, but actually reading from a file fails
I've tried the mentioned mkspiffs 0.2.1 and the one included in duktape-esp32/bin, both fail.
I've turned on SPIFFS_DBG logging, the 2 different mkspiffs generate different output
0.2.1 version:
D (27595) SPIFFS: read: offset:0 rd:128 data spix:0000 is data_pix:ffff addr:00ffff05
stock mkspiffs binary from duktape-esp32/bin
D (1123255) SPIFFS: read: offset:0 rd:128 data spix:0000 is data_pix:0000 addr:00000005

@boneskull boneskull mentioned this pull request Feb 10, 2018
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

Successfully merging this pull request may close these issues.

3 participants