Irremoteesp8266: TODO: Move from SPIFFS to LittleFS or similar.

Created on 9 Jun 2020  Â·  9Comments  Â·  Source: crankyoldgit/IRremoteESP8266

Apparently SPIFFS is depreciated.

warning: 'SPIFFS' is deprecated (declared at /home/travis/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/FS.h:269): SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]

Low priority.

enhancement help wanted

Most helpful comment

Can I come to do this job?

All 9 comments

Can I come to do this job?

Can I come to do this job?

Absolutely, marked as help-wanted for that reason. ;)
Let us know if you need anything or if something is unclear.

ESP32 support for LittleFS still seems less then stable, I wonder if #define FS LittleFS and #define FS SPIFFS could be used.
Otherwise I think the ESP32 build needs to pull in other dependencies.

Also one other thing to note (for the release) is that any existing SPIFFS data will be lost.

So, do I only move the ESP8266 part now?

So, do I only move the ESP8266 part now?

That's a reasonable first step.

I wonder if #define FS LittleFS and #define FS SPIFFS could be used.

Agreed. Having one spot for the #if defined(ESP8266) control is a better solution.

Otherwise I think the ESP32 build needs to pull in other dependencies.

I ran into that when I first gave it a quick attempt (at a full conversion). ESP8266 first is a good step in the right direction. Baby steps. ;-)

Also one other thing to note (for the release) is that any existing SPIFFS data will be lost.

Yeah, I couldn't see an easy/obvious way to do a conversion. Hence giving the user some compile-time option to control what filesystem is used is probably a good idea.
e.g.

// Uncomment one of the following to manually override what type of persistent storage is used.
// Warning: Changing filesystems will cause all previous locally saved configuration data to be lost.
// #define FILESYSTEM SPIFFS
// #define FILESYSTEM LittleFS

#ifndef FILESYSTEM
// Set the default filesystem if none was specified.
#if defined(ESP8266)
#define FILESYSTEM LittleFS
#else
#define FILESYSTEM SPIFFS
#endif  // defined(ESP8266)
#endif  // FILESYSTEM

I have on idea what makes warning as below:
*warning: "FILESYSTEM" redefined

define FILESYSTEM SPIFFS

note: this is the location of the previous definition
#define FILESYSTEM LittleFS*

@crankyoldgit @NiKiZe

I have on idea what makes warning as below:
_warning: "FILESYSTEM" redefined #define FILESYSTEM SPIFFS note: this is the location of the previous definition #define FILESYSTEM LittleFS_

@crankyoldgit @NiKiZe

Appears this is generated in:

/home/travis/build/crankyoldgit/IRremoteESP8266/examples/Web-AC-control/Web-AC-control.ino:48:0: warning: "FILESYSTEM" redefined
 #define FILESYSTEM SPIFFS
 ^
/home/travis/build/crankyoldgit/IRremoteESP8266/examples/Web-AC-control/Web-AC-control.ino:46:0: note: this is the location of the previous definition
 #define FILESYSTEM LittleFS

and

/home/travis/build/crankyoldgit/IRremoteESP8266/examples/IRMQTTServer/IRMQTTServer.ino:399:0: warning: "FILESYSTEM" redefined [enabled by default]
 #define FILESYSTEM SPIFFS
 ^
/home/travis/build/crankyoldgit/IRremoteESP8266/examples/IRMQTTServer/IRMQTTServer.ino:397:0: note: this is the location of the previous definition
 #define FILESYSTEM LittleFS

Looks like the #ifndef FILESYSTEM line isn't working as expected.

Try:

#if !defined(FILESYSTEM)
// Set the default filesystem if none was specified.
#if defined(ESP8266)
#define FILESYSTEM LittleFS
#else
#define FILESYSTEM SPIFFS
#endif  // defined(ESP8266)
#endif  // !defined(FILESYSTEM)

The code changes mention have now been included in the newly released v2.7.10 of the library.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NewUser9 picture NewUser9  Â·  6Comments

jlhavens picture jlhavens  Â·  7Comments

AsimZulfiqar67 picture AsimZulfiqar67  Â·  6Comments

leobel96 picture leobel96  Â·  6Comments

ilyasrois picture ilyasrois  Â·  3Comments