Hello all,
I'm in the process of upgrading the functionality of some of my sketches, and in the process I need to replace AsyncElegantOTA with ElegantOTA. These sketches were compiled with an earlier version of the IDE that is installed on my environment at the moment.
The OTA upgrade wasn't a problem except in one case, but I'll post a new thread to address that.
I'm having a problem with LittleFS. To make sure I understand the problem, I compiled the example: LittleFS_test.ino.
The error message when compiling is the same.
Here is the information about the environment that caused this compilation error.
Windows version: 10 Pro
IDE version: 2.3.2
Board: WEMOS LOLIN32
Library version: LittleFS_esp32 (1.0.6)
Sketch: /examples/LittleFS_test (as is)
Compilation error message:
c:\Users\Serge\Documents\Arduino\libraries\LittleFS_esp32\src\LITTLEFS.cpp: In member function 'virtual bool LITTLEFSImpl::exists(const char*)':
c:\Users\Serge\Documents\Arduino\libraries\LittleFS_esp32\src\LITTLEFS.cpp:44:18: error: no matching function for call to 'LITTLEFSImpl::open(const char*&, const char [2])'
44 | File f = open(path, "r");
| ~~~~^~~~~~~~~~~
In file included from c:\Users\Serge\Documents\Arduino\libraries\LittleFS_esp32\src\LITTLEFS.cpp:17:
C:\Users\Serge\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.3\libraries\FS\src/vfs_api.h:37:15: note: candidate: 'virtual fs::FileImplPtr VFSImpl::open(const char*, const char*, bool)'
37 | FileImplPtr open(const char *path, const char *mode, const bool create) override;
| ^~~~
C:\Users\Serge\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.3\libraries\FS\src/vfs_api.h:37:15: note: candidate expects 3 arguments, 2 provided
exit status 1
Compilation error: exit status 1
I'm really in blue ...
Thanks by advance for your help!
Your topic has been moved. Please do not post in "Uncategorized"; see the sticky topics in Uncategorized - Arduino Forum.
I suspect that the problem is less with the IDE as well as with the ESP32 board package. Which version of the board package was the code originally compiled with? Which board package version are you now compiling with.
If the current ESP32 board package version is 3.x you can try to roll it back to 2.x and see if that solves the problem. There were breaking changes so if rolling back you know where to look ( Migration from 2.x to 3.0 - - — Arduino ESP32 latest documentation)
Good evening sterretje,
Many thanks for your quick reply.
Next time I'll take care of your remark regarding the place where I've to put my post.
As far as I remember, the ESP32 board package version used previuosly was 2.0.13. Anyway, regarding the board I use (WEMOS LOLIN32) it seems that now, version 3.0.3 is required.
The same causes producing the same effects, I find myself in the same situation, with the same compilation error.
So, I'm probably wrong somewhere but where ...
Hi @sergio83100.
If you check the readme for the "LittleFS_esp32" library:
https://github.com/lorol/LITTLEFS#ths-library-is-now-part-of-arduino-esp32-core-v2
Ths library is now part of Arduino esp32 core v2
Note, there it is renamed from LITTLEFS to LittleFS, Please post your issues there. This here is kept for Arduino esp32 core 1.x purposes
This means that the "LittleFS_esp32" library is now bundled with the "esp32" boards platform and so it is available without needing to install the library via the Arduino IDE Library Manager.
The version of the library you installed via Library Manager is no longer maintained, while the version bundled with the platform is actively maintained. The reason you experienced this error is because the outdated version of the library from Library Manager is incompatible with modern versions of the "esp32" platform. The bundled library is maintained in parallel with the platform and so will always be compatible with the installed platform version.
Select File > Examples > LittleFS > LITTLEFS_test from the Arduino IDE menus (note that I selected the example from the "LittleFS" library instead of from the "LittleFS_esp32" library) and then try compiling that sketch. You should find that it compiles without any errors. You can study that code to understand how to use the modern version of the library (should be pretty similar to the old version).
Since the obsolete "LittleFS_esp32" library is not of any value, I recommend you uninstall it from your computer to avoid any confusion. I'll provide instructions you can follow to do that:
- Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus to open the "Library Manager" view in the left side panel.
- Type
LittleFS_esp32
in the "Filter your search..." field.
- Scroll down through the list of libraries until you see the "LittleFS_esp32" entry.
- Hover the mouse pointer over the "LittleFS_esp32" entry.
- You will see a ●●● icon appear near the top right corner of the library entry. Click on that icon.
A context menu will open.
- Select "Remove" from the menu.
An "Uninstall" dialog will open.
- Click the "YES" button in the "Uninstall" dialog to confirm that you want to uninstall the library.
The dialog will close.
- Wait for the uninstall process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:
ⓘ Successfully uninstalled library ...
Hello ptillisch,
I proceeded as you indicated to me and I was able to compile my sketch without error.
When we are faced with an error situation and we do not have the level of knowledge to resolve this situation, it is comforting to be able to count on the assistance of expert and educational people like you.
Thank you for your valuable help!
You are welcome. I'm glad it is working now.
Regards,
Per