-
Notifications
You must be signed in to change notification settings - Fork 13.3k
SPIFFS setConfig #6322
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
Comments
No, that won't work and the existing example is right. The code compiles fine. Maybe you're missing a
gives
|
No. Clean install of core 2.5.2 on Windows 7 and Arduino 1.8.9 throws this message when trying to compile your code: void setup() { } void loop() { }` Arduino: 1.8.9 (Windows 7), Board: "LOLIN(WEMOS) D1 R2 & mini, 160 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (2M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600" class SPIFFSConfig : public FSConfig SPIFFStest:5:1: error: 'cfg' was not declared in this scope cfg.setAutoFormat(false); exit status 1 However, replacing SPIFFSConfig with FSConfig, compiles well. Anyway, I hope this is going to help others running into the same issue. |
Very odd. I will try a 2.5.2 clean install. In any case, the current GIT head is fine. The problem with passing in a FSConfig is that it doesn't have the right header and I believe the code will return an error and ignore any settings therein. So, unfortunately, your suggestion will compile fine but won't actually work. I'll update after I get the 2.5.2 toolchain installed/tested. |
Yup, you're right that the 2.5.2 release has a bug but it's not that it doesn't define SPIFFSConfig, its that it doesn't have a The correct solution, on 2.5.2 only, is to use GIT head is fine, so this has already been fixed. Don't pass in a FSConfig. It will compile, but if you check the return code you will find that it returns
|
Actually, darn it, GIT head also seems wonky. Good catch and thanks for following up! |
The SPIFFS config object was defined in FS.h in its own namespace, but is not made easily available like other SPIFFS and FS objects because of a missing `using` statement. Add it in FS.h Fixes esp8266#6322
----------------------------- Delete below -----------------------------
Basic Infos
Problem Description
Description of SPIFFS file system is wrong (https://github.com./esp8266/Arduino/blob/master/doc/filesystem.rst):
"SPIFFSConfig" has to be replaced by "FSConfig", otherwise the compiler will throw the error:
'SPIFFSConfig' was not declared in this scope
Please change the description or edit definition in FS.h
The text was updated successfully, but these errors were encountered: