PlatformIO Community

ESP32->ESP8266Audio@^1.8 problem!

platformio.ini:
01
main.cpp:
02

PlatformIO:Build->

> Executing task in folder ESP32-HDDZ: C:\Users\Administrator\.platformio\penv\Scripts\pio.exe run <

Processing featheresp32 (platform: espressif32; board: featheresp32; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/featheresp32.html
PLATFORM: Espressif 32 (2.1.0) > Adafruit ESP32 Feather
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, 
tumpa)
PACKAGES:
 - framework-arduinoespressif32 3.10004.201016 (1.0.4)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 28 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP8266Audio> 1.8.0
|   |-- <SPI> 1.0
|   |-- <SPIFFS> 1.0
|   |   |-- <FS> 1.0
|   |-- <HTTPClient> 1.2
|   |   |-- <WiFi> 1.0
|   |   |-- <WiFiClientSecure> 1.0
|   |   |   |-- <WiFi> 1.0
|   |-- <WiFiClientSecure> 1.0
|   |   |-- <WiFi> 1.0
|   |-- <FS> 1.0
|-- <SPIFFS> 1.0
|   |-- <FS> 1.0
|-- <WiFi> 1.0
Building in release mode
Compiling .pio\build\featheresp32\lib5f6\ESP8266Audio\AudioFileSourceSD.cpp.o
Compiling .pio\build\featheresp32\lib5f6\ESP8266Audio\AudioGeneratorMP3.cpp.o
Compiling .pio\build\featheresp32\lib5f6\ESP8266Audio\AudioGeneratorMP3a.cpp.o
Compiling .pio\build\featheresp32\lib5f6\ESP8266Audio\AudioGeneratorOpus.cpp.o
Compiling .pio\build\featheresp32\lib5f6\ESP8266Audio\AudioGeneratorRTTTL.cpp.o
Compiling .pio\build\featheresp32\lib5f6\ESP8266Audio\AudioGeneratorTalkie.cpp.o
Compiling .pio\build\featheresp32\lib5f6\ESP8266Audio\AudioGeneratorWAV.cpp.o
Compiling .pio\build\featheresp32\lib5f6\ESP8266Audio\AudioLogger.cpp.o
In file included from .pio\libdeps\featheresp32\ESP8266Audio\src\AudioFileSourceSD.cpp:21:0:
.pio\libdeps\featheresp32\ESP8266Audio\src\AudioFileSourceSD.h:25:16: fatal error: SD.h: No such file or directory

************************************************************
* Looking for SD.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:SD.h"
* Web  > https://platformio.org/lib/search?query=header:SD.h
*
************************************************************

compilation terminated.
*** [.pio\build\featheresp32\lib5f6\ESP8266Audio\AudioFileSourceSD.cpp.o] Error 1
=================================================================== [FAILED] Took 6.26 seconds ===================================================================

03 :joy:

How to solve this problem?

thank you!

Just add the SD library from the Arduino-ESP32 repo.

Its name is

Thus you write

lib_deps =
    earlephilhower/ESP8266Audio @ ^1.8
    SD(esp32)

(no owner name or version for a framework built-in library!)

After that the dependency graph should look like

Dependency Graph
|-- <ESP8266Audio> 1.8.0
|   |-- <SPI> 1.0
|   |-- <SPIFFS> 1.0
|   |   |-- <FS> 1.0
|   |-- <HTTPClient> 1.2
|   |   |-- <WiFi> 1.0
|   |   |-- <WiFiClientSecure> 1.0
|   |   |   |-- <WiFi> 1.0
|   |-- <WiFiClientSecure> 1.0
|   |   |-- <WiFi> 1.0
|   |-- <FS> 1.0
|   |-- <SD(esp32)> 1.0.5
|   |   |-- <FS> 1.0
|   |   |-- <SPI> 1.0
|-- <SD(esp32)> 1.0.5
|   |-- <FS> 1.0
|   |-- <SPI> 1.0
|-- <SPIFFS> 1.0
|   |-- <FS> 1.0
|-- <WiFi> 1.0

and compile successfully

Building .pio\build\esp32\firmware.bin
Checking size .pio\build\esp32\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]  11.9% (used 38840 bytes from 327680 bytes)
Flash: [======    ]  60.5% (used 793190 bytes from 1310720 bytes)
esptool.py v3.0
======================= [SUCCESS] Took 26.12 seconds =======================
1 Like

Thank you again!

excellent.

I like platformio more and more!

Admirable!