Skip to content

SPIFFS reads junk data. #1068

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
rfestag opened this issue Feb 2, 2018 · 4 comments
Closed

SPIFFS reads junk data. #1068

rfestag opened this issue Feb 2, 2018 · 4 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@rfestag
Copy link
Contributor

rfestag commented Feb 2, 2018

Please fill the info fields, it helps to get you faster support ;)

If you have a Guru Meditation Error, please decode it:
https://github.com/me-no-dev/EspExceptionDecoder

----------------------------- Remove above -----------------------------

Hardware:

Board: Adafruit ESP32 Feather
Core Installation/update date: ???
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: 115200

Description:

Some changes after 12/19/2017 appear to have broken SPIFFS. See me-no-dev/arduino-esp32fs-plugin#6. I just rolled back this library to the last commit on that day, and reads appear to be correct.

I don't know if this means arduino-esp32fs-plugin needs an update, or if something unexpected changed here.

Sketch:

#include <Arduino.h>
#include <SPIFFS.h>
#include <FS.h>


void setup() {
  Serial.begin(115200);
  delay(2000);      // sanity check delay

  if (!SPIFFS.begin()) {
    Serial.println("Failed to mount SPIFFS");
  }
  Serial.printf("Listing directory: %s\n", "/");

  File root = SPIFFS.open("/");
  if(!root){
    Serial.println("Failed to open directory");
    return;
  }
  if(!root.isDirectory()){
    Serial.println("Not a directory");
    return;
  }
  File file = root.openNextFile();
  while(file){
    Serial.print("  FILE: ");
    Serial.print(file.name());
    Serial.print("  SIZE: ");
    Serial.println(file.size());    
    file = root.openNextFile();
    uint8_t x; while (file.read(&x, 1)) Serial.printf("%02X", x);
  }
  
  Serial.println("Done Setup");
}
void loop() {

}

Debug Messages:

Enable Core debug level: Debug on tools menu of Arduino IDE, then put the serial output here 
@hpwit
Copy link

hpwit commented Feb 4, 2018

hello
I did reinstall everything according to the manual but still get the error
i am on mad os X
i have used the git clone command
how can you lake sure I have the right library ?
thank
rgds
yves
BTW do you know what flash mode QIO DIO mean 'cause the version of the esp32fs that I have always uplaod in DIO
from which date is your esp32fs ?$thank you

@lonerzzz
Copy link
Contributor

@hpwit QIO and DIO are flash mode speeds which depend on the hardware you are using. You want to make sure that you use the same flash speed as your hardware prints out. In the Arduino IDE, this is shown under the Tools menu as Flash Mode.

@stale
Copy link

stale bot commented Aug 1, 2019

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 Aug 1, 2019
@stale
Copy link

stale bot commented Aug 15, 2019

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

@stale stale bot closed this as completed Aug 15, 2019
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

3 participants