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

LITTLEFSimpl::exists() bug with Platformio (ESP32 arduino framework) in Visual Studio Code #43

Open
har-in-air opened this issue Oct 15, 2021 · 11 comments

Comments

@har-in-air
Copy link

Compiling .pio/build/esp32dev/lib63a/LittleFS_esp32/LITTLEFS.cpp.o
.pio/libdeps/esp32dev/LittleFS_esp32/src/LITTLEFS.cpp: In member function 'virtual bool LITTLEFSImpl::exists(const char*)':
.pio/libdeps/esp32dev/LittleFS_esp32/src/LITTLEFS.cpp:44:28: error: no matching function for call to 'LITTLEFSImpl::open(const char*&, const char [2])'
     File f = open(path, "r");
In file included from .pio/libdeps/esp32dev/LittleFS_esp32/src/LITTLEFS.cpp:17:
/home/hari/.platformio/packages/framework-arduinoespressif32/libraries/FS/src/vfs_api.h:38:17: note: candidate: 'virtual fs::FileImplPtr VFSImpl::open(const char*, const char*, bool)'
     FileImplPtr open(const char* path, const char* mode, const bool create) override;
                 ^~~~
/home/hari/.platformio/packages/framework-arduinoespressif32/libraries/FS/src/vfs_api.h:38:17: note:   candidate expects 3 arguments, 2 provided
*** [.pio/build/esp32dev/lib63a/LittleFS_esp32/LITTLEFS.cpp.o] Error 1

Fixed by adding third argument
File f = open(path, "r", false);

@har-in-air har-in-air changed the title LITTLEFSimpl::open bug with latest Platformio (ES32 arduino framework) in Visual Studio Code LITTLEFSimpl::exists() bug with Platformio (ESP32 arduino framework) in Visual Studio Code Oct 15, 2021
@goblingift
Copy link

@tonyrewin - thanks for your bugfix. When will this gets released?

@Michael2MacDonald
Copy link

Screw it. I am going to submit a fix today if possible.

@Michael2MacDonald
Copy link

Michael2MacDonald commented Sep 28, 2022

For some reason, I can't get the PR I created to show up here. If someone could help teach me how to do that or why it is not working then that would be great.

But my PR can be found here: #56

Please review and merge my PR so this tiny issue can finally be over!

EDIT: I got trigger happy and just realized that PR #49 exists!
Please merge one of these, or make the fix manually, and then close all the PRs and this issue!

@waymond91
Copy link

Im still running into this using platformio. Am I installing the wrong version?

linkoab added a commit to linkoab/LITTLEFS that referenced this issue Mar 31, 2023
linkoab added a commit to linkoab/LITTLEFS that referenced this issue Mar 31, 2023
@eatonJ
Copy link

eatonJ commented Apr 4, 2023

FYI ... I had this issue today and used this fix to correct the error . Thanks

@sommerper
Copy link

@eatonJ How did you fix it? I'm still getting the error when importing to PlatformIO. :-/
Latest release seems to be lorol/LittleFS_esp32@^1.0.6.

@zhaocundang
Copy link

yes, 2023 5-1 still error

@dharms87
Copy link

dharms87 commented May 6, 2023

Tried to implement this library in a PlatformIO project. Received similar error messages posted above.

However, I noticed this message in the output when compiling:
LittleFS_esp32/src/esp_littlefs.c:19:2: warning: #warning ("Use the built-in LITTLEFS library") [-Wcpp]
#warning("Use the built-in LITTLEFS library")

After reviewing the "Built-In" portion of the supported libraries within PlatformIO. I noticed that LittleFS is built into the framework-arduinoespressif32.

My project compiled successfully after doing the following in my main.cpp file:
#include <LittleFS.h>

Then add the following in the platformio.ini file, under the lib_deps = LittleFS @ ^2.0.0

@gatti-d
Copy link

gatti-d commented Jun 20, 2023

Received similar error messages posted above.
The solution proposed by #dharms87 worked as well.
Thank you!

hakuamesan added a commit to hakuamesan/LITTLEFS that referenced this issue Jul 24, 2023
Fixed LITTLEFSimpl::exists() error: Fix lorol#43 lorol#56
@urs8000
Copy link

urs8000 commented Oct 15, 2023

still had the error compiling LITTLEFS_test.ino under Arduino 1.8.19
corrected as in first comment with ... in LITTLEFS.cpp
bool LITTLEFSImpl::exists(const char* path) { File f = open(path, "r", false); return (f == true); }

@Michael2MacDonald
Copy link

Michael2MacDonald commented Feb 25, 2024

I have a PR located here (#56). It has been approved but no action has been taken to merge it for some reason.

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

No branches or pull requests

10 participants