[X] PlatformIO Core.
If you’ve found a bug, please provide an information below.
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Win10 x64
PlatformIO Version (platformio --version): 6.1.5a3
Description of problem
If the Arduino-ESP32's SD_MMC library is included and LDF mode deep+ or chain+ are used, the subdependency to the FS library is not detected and the build fails. PlatformIO's LDF fails to analyze the #ifdef macro correctly.
Steps to Reproduce
Create a new featheresp32 project
Add lib_ldf_mode = chain+ to platformio.ini
Add #include <SD_MMC.h> to src/main.cpp
Press Build Button
Actual Results
Dependency Graph
|-- SD_MMC @ 2.0.0
Building in release mode
[..]
*** [.pio\build\featheresp32\libd79\SD_MMC\SD_MMC.cpp.o] Error 1
In file included from src/main.cpp:2:
C:/Users/Max/.platformio/packages/framework-arduinoespressif32/libraries/SD_MMC/src/SD_MMC.h:21:10: fatal error: FS.h: No such file or directory
************************************************************
* Looking for FS.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:FS.h"
* Web > https://registry.platformio.org/search?q=header:FS.h
*
************************************************************
#include "FS.h"
^~~~~~
compilation terminated.
*** [.pio\build\featheresp32\src\main.cpp.o] Error 1
Expected Results
Successfull compilation.
Dependency Graph
|-- SD_MMC @ 2.0.0
| |-- FS @ 2.0.0
Building in release mode
[...]
==================== [SUCCESS] Took 15.58 seconds ====================
The deep+ and chain+ mode should correctly detect that the macro SOC_SDMMC_HOST_SUPPORTED is enabled (in soc/soc_caps.h for the ESP32) and detect the FS.h inclusion, but it does not.
This is showcased by adding build_flags = -DSOC_SDMMC_HOST_SUPPORTED to the platformio.ini, which makes the build pass with deep+ and chain+ modes.
What kind of issue is this?
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Win10 x64
PlatformIO Version (
platformio --version
): 6.1.5a3Description of problem
If the Arduino-ESP32's SD_MMC library is included and LDF mode deep+ or chain+ are used, the subdependency to the FS library is not detected and the build fails. PlatformIO's LDF fails to analyze the
#ifdef
macro correctly.Steps to Reproduce
featheresp32
projectlib_ldf_mode = chain+
toplatformio.ini
#include <SD_MMC.h>
tosrc/main.cpp
Actual Results
Expected Results
Successfull compilation.
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info
The build always passes with the "dumb" LDF modes that don't try to evaluate macros (
chain
anddeep
).The library conditionally includes
FS.h
based onThe
deep+
andchain+
mode should correctly detect that the macroSOC_SDMMC_HOST_SUPPORTED
is enabled (insoc/soc_caps.h
for the ESP32) and detect theFS.h
inclusion, but it does not.This is showcased by adding
build_flags = -DSOC_SDMMC_HOST_SUPPORTED
to theplatformio.ini
, which makes the build pass withdeep+
andchain+
modes.