v5.1.0 broked something related to LittleFS and SPIFFS with TinyPICO board... works in Arduino IDE.
See original GitHub issueThis is a small code sample that read and write to Little FS on ESP32.
#include "WiFi.h"
#include <FS.h>
#include <LittleFS.h>
void setup() {
Serial.begin(115200);
// Set WiFi to station mode and disconnect from an AP if it was previously connected
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);
Serial.println("Setup done");
if (!LittleFS.begin(true)) {
Serial.println("Formatted");
} else {
Serial.println("Formatteddd");
LittleFS.format();
}
File file = LittleFS.open("/prova.txt", "w");
//Write to the file
file.print("dsadasdsa");
delay(1);
//Close the file
file.close();
Serial.println("wrote");
File file2 = LittleFS.open("/prova.txt", "r");
if (!file2) {
Serial.println("No Saved Data!");
}
Serial.println(file2.read());
}
void loop() {
Serial.println("scan start");
// WiFi.scanNetworks will return the number of networks found
int n = WiFi.scanNetworks();
Serial.println("scan done");
if (n == 0) {
Serial.println("no networks found");
} else {
Serial.print(n);
Serial.println(" networks found");
for (int i = 0; i < n; ++i) {
// Print SSID and RSSI for each network found
Serial.print(i + 1);
Serial.print(": ");
Serial.print(WiFi.SSID(i));
Serial.print(" (");
Serial.print(WiFi.RSSI(i));
Serial.print(")");
Serial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN) ? " " : "*");
delay(10);
}
}
Serial.println("");
// Wait a bit before scanning again
delay(5000);
}
if I use a TinyPICO board, this small snippet fails reading writing LittleFS when using
espressif32@5.1.0
it works well when using
espressif32@5.0.0
I noticed that the only way to make it work with
espressif32@5.1.0
is to use
board_build.flash_mode = qio
instead of
board_build.flash_mode = dio
but this does not have sense to me.
when using espressif32@5.0.0
that snippet works with both QIO
and DIO
.
the problem happen on TinyPICO board only, it does not happen on LolinD32 or other ESP32 boards I have.
Same snipped always works well with Arduino IDE when using Core 2.0.4.
Issue Analytics
- State:
- Created a year ago
- Comments:29 (20 by maintainers)
Top Results From Across the Web
Platform-espressif32 v5.1.0 and bootloop - #21 by sblantipodi
With Arduino IDE it prints “Formatted” and it works as expected. With PlatformIO I see this in the console: E (322) SPIFFS: mount...
Read more >#203 SPIFFS vs LITTLEFS for ESP32 & ESP8266 ... - YouTube
#203 SPIFFS vs LITTLEFS for ESP32✓ & ESP8266✓ (not Arduino UNO ❌). Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >ESP8266 Arduino Core Documentation - Read the Docs
8 Guide to PROGMEM on ESP8266 and Arduino IDE ... Note that some boards and modules (ESP-12ED, NodeMCU 1.0) also break out pins...
Read more >Coding Examples — TinyPICO
TinyPICO ships with MicroPython v1.10 pre flashed and some code to flash random colours on the APA102, so you know it's working when...
Read more >Is SPIFFS Upload Broken... Again? - Arduino Forum
I now find I can open the files, but all reads return all data as 0xff. It is not the board, as I've...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@valeros Perfect! Thx, for your great support 😃
@cyberman54 Just run
pio platform update espressif32
in the IDE terminal.