Closed toqix closed 7 months ago
That is the behavior of PlatformIO
that will create all objects even that header was just included but the class will never be used.
You can compare the program size between disable and enable that option instead of just seeing compiling log.
There is nothing to do in this case.
At least you can remove or comment these from FirebaseFS.h.
#include <SD.h>
#define DEFAULT_SD_FS SD
#define CARD_TYPE_SD 1
This will exclude FS.h
which takes a lot of flash space, from library compilation.
Thank you for your help. I also now understand that part of the 'issue' lies within PlatformIO.
Describe the bug When using the 'DISABLE_SD' build-flag in PlatformIO the library still imports its SD libraries and tries to create its own SD objects. This leads to compile errors when working with a custom SD implementation such as SDFat on ESP32.
To Reproduce Using PlatformIO install the library and use any basic example, use the 'ESP32 Dev Kit' board, include "-D DISABLE_SD" in the platformio.ini file and try to compile the sketch.
Expected behavior The build-flag should disable all SD implementations, thus no SD specific libraries or objects should be referenced or created.
Screenshots When running a quick search through the library source code, you find that the only time "DISABLE_SD" is referenced is in the following comment:
Firebase Arduino Client Library for ESP8266 and ESP32/src/FirebaseFS.h:
IDE and its version:
Board
Additional context I will create a pull-request that tries to implement the expected behaviour soon.