Hi all,
I’m using PlatformIO on ESP32 since years now…
It worked well until v5.0… As soon as I update to 5.1 my firmware stopped working.
It boot loop.
I know that something is changed in the latest 5.1, in the release notes I read this:
“This release introduces an additional build step that merges all the primary binaries (partitions, bootloaders and the firmware itself) into a single binary before debugging or uploading via debug probes.”
Hi @sblantipodi ! Could you please provide a bit more info on your setup? What’s your target and how do you program it? Anyway, you mentioned that it worked just fine with the v5.0.0, so you can always roll back to that version while we’re figuring out the cause of the problem, for example:
OK, I don’t see any traces of the use of debug probes, so the warning from the release notes in the release do not apply here. Your project seems quite complex to debug the issue, any chance you could try a simpler example, e.g. wifi-scan?
Hi @valeros if this can help fixing the problem I have the same issue with LittleFS.
Using espressif32@5.0.0, I have no problem in writing and reading from LittleFS and SPIFFS,
with espressif32@5.1.0 I can’t read/write to LittleFS and SPIFFS using the same codeused with version 5.0.0.
When using LittleFS I have this error:
./components/esp_littlefs/src/littlefs/lfs.c:1071:error: Corrupted dir pair at {0x0, 0x1}
E (114) esp_littlefs: mount failed, (-84)
E (117) esp_littlefs: Failed to initialize LittleFS
[ 126][E][LittleFS.cpp:94] begin(): Mounting LittleFS failed! Error: -1
LittleFS mount failed
[ 143][E][vfs_api.cpp:24] open(): File system is not mounted
the error I got with SPIFFS is reported in the post above this one.
So, it’s not really a bootloop, only the filesystem fails to start. Have you tried erasing the entire flash memory before uploading? Just run the pio run -t erase command in the IDE terminal.
Also, could you please try the same wifi-scan example with SPIFFS in the Arduino IDE? Does it work there?
Hi @sblantipodi , thanks for testing it with the Arduino IDE. I also tried that code with all boards I have at hand and sadly wasn’t able to reproduce. Could you please try the following configuration with the same wifi-scan example:
It seems something has changed in the framework itself. I noticed that you adjusted flash frequency in your platformio.ini via board_build.f_flash. Are there settings the same when you’re testing in the Arduino IDE? I’m asking mainly because the prebuilt images in the latest revision of the Arduino framework is quite sensitive to these values.
In Arduino IDE I’m using the defaults for the Lolin D32 board and for the TinyPICO,
boths works well in Arduino IDE.
Ok, let’s get back to the non-working configuration without the platform_packages option. What happens if you don’t format SPIFFS on the first start (SPIFFS.begin(false)) and then upload a simple filesystem image via PlatformIO? Does it fail as well? Can you see the files uploaded to the filesystem?
IMO, this is not the best approach. With each new release the Arduino core for ESP32 changes its approach to handling different board variants and their flash memory settings, it’s especially evident with the ESP32S3 target that can have completely different flash memory configuration based on the chip revision. By default you can compile for the esp32dev, but it might be a good idea to clearly mention it in your release notes.
what’s the difference between a Lolin D32 versus a DevKit or a TinyPICO?
By default Lolin D32 and DevKit use different flash mode and hence the same firmware may not work on both targets. TinyPICO is even more different target, it has PSRAM on board and hence compiled with additional build flags to make is usable.
if I manually upload the FS and use SPIFFS.begin(false) it works on PlatformIO 5.0.0.
I can see the uploaded file.
The same does not work on PlatformIO 5.1.1
We are in the era of the web installers, tasmota, esp home and very known firmware are releasing only one binary for every ESP32…