Hello, I have an interesting issue involving three different installations of platformIO. Only one of the installations allows me to successfully build a project on a Wemos D1, the other two have library failures despite copying over the entire project directory of the working build. Each of the three installations have identical platform.json files located under .platformio/platforms/espressif8266 (used a file diff utility to verify this) Here are the file contents:
{
"name": "espressif8266",
"title": "Espressif 8266",
"description": "ESP8266 is a cost-effective and highly integrated Wi-Fi MCU with built-in TCP/IP networking software for IoT applications. ESP8266 integrates an enhanced version of Tensilica’s L106 Diamond series 32-bit processor and on-chip SRAM.",
"homepage": "https://espressif.com/",
"license": "Apache-2.0",
"keywords": [
"dev-platform",
"Wi-Fi",
"Xtensa",
"106Micro"
],
"engines": {
"platformio": "^6"
},
"repository": {
"type": "git",
"url": "https://github.com/platformio/platform-espressif8266.git"
},
"version": "4.2.1",
"frameworks": {
"arduino": {
"package": "framework-arduinoespressif8266",
"script": "builder/frameworks/arduino.py"
},
"esp8266-rtos-sdk": {
"package": "framework-esp8266-rtos-sdk",
"script": "builder/frameworks/esp8266-rtos-sdk.py",
"description": "ESP8266 SDK based on FreeRTOS, a truly free professional grade RTOS for microcontrollers",
"homepage": "https://github.com/espressif/ESP8266_RTOS_SDK",
"title": "ESP8266 RTOS SDK"
},
"esp8266-nonos-sdk": {
"package": "framework-esp8266-nonos-sdk",
"script": "builder/frameworks/esp8266-nonos-sdk.py",
"description": "The non-OS SDK provides a set of application programming interfaces (APIs) for core ESP8266 functionalities such as data reception/transmission over Wi-Fi, TCP/IP stack functions, hardware interface functions and basic system management functions",
"homepage": "https://github.com/espressif/ESP8266_NONOS_SDK",
"title": "ESP8266 Non-OS SDK"
}
},
"packages": {
"toolchain-xtensa": {
"type": "toolchain",
"owner": "platformio",
"version": "~2.100300.220621",
"optionalVersions": ["~1.40802.0"]
},
"framework-arduinoespressif8266": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~3.30102.0"
},
"framework-esp8266-rtos-sdk": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": ">=1.5.0-beta"
},
"framework-esp8266-nonos-sdk": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": ">=2.1.0"
},
"tool-esptool": {
"type": "uploader",
"owner": "platformio",
"version": "<2"
},
"tool-esptoolpy": {
"type": "uploader",
"owner": "platformio",
"version": "~1.30000.0"
},
"tool-mkspiffs": {
"type": "uploader",
"optional": true,
"owner": "platformio",
"version": "~1.200.0"
},
"tool-mklittlefs": {
"type": "uploader",
"optional": true,
"owner": "platformio",
"version": "~1.203.0"
}
}
}
When building on the second install of platformIO, on another Mac computer, here is what is reported:
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1.html
PLATFORM: Espressif 8266 (4.2.1) > WEMOS D1 R1
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 @ 3.30102.0 (3.1.2)
- tool-esptool @ 1.413.0 (4.13)
- tool-esptoolpy @ 1.30000.201119 (3.0.0)
- toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Library Manager: Installing Adafruit_BME280_Library-master
Warning! Could not find the package with 'Adafruit_BME280_Library-master' requirements for your system 'darwin_x86_64'
Found 54 compatible libraries
Scanning dependencies...
Dependency Graph
|-- EasyDDNS @ 1.8.0
|-- TFT_eSPI @ 2.5.43
|-- avr-fast-shift @ 1.1.0
|-- Firmata @ 2.5.9
|-- PubSubClient @ 2.8.0
|-- Adafruit Unified Sensor @ 1.1.14
|-- ESP8266 and ESP32 OLED driver for SSD1306 displays @ 4.6.1
|-- Adafruit BME280 Library @ 2.2.4
|-- ESP8266WebServer @ 1.0.0+sha.61cc811
|-- Adafruit ILI9341 @ 1.6.1
|-- Time @ 1.6.1+sha.a18e50d
|-- ESP8266HTTPClient @ 1.2
|-- Adafruit GFX Library @ 1.11.11
|-- ArduinoOTA @ 1.0
|-- EEPROM @ 1.0
|-- ESP8266WiFi @ 1.0
|-- Wire @ 1.0
Building in release mode
Compiling .pio/build/d1/lib1ff/Firmata/utility/SerialFirmata.cpp.o
Archiving .pio/build/d1/libe0e/libWire.a
Archiving .pio/build/d1/lib588/libESP8266 and ESP32 OLED driver for SSD1306 displays.a
Archiving .pio/build/d1/libe5a/libAdafruit BusIO.a
Archiving .pio/build/d1/lib7b9/libAdafruit BME280 Library.a
Compiling .pio/build/d1/libffc/ESP8266WebServer/ESP8266WebServer.cpp.o
Compiling .pio/build/d1/libffc/ESP8266WebServer/Parsing.cpp.o
Indexing .pio/build/d1/lib588/libESP8266 and ESP32 OLED driver for SSD1306 displays.a
Indexing .pio/build/d1/lib7b9/libAdafruit BME280 Library.a
Indexing .pio/build/d1/libe5a/libAdafruit BusIO.a
Indexing .pio/build/d1/libe0e/libWire.a
Compiling .pio/build/d1/lib08d/Adafruit GFX Library/Adafruit_GFX.cpp.o
Compiling .pio/build/d1/lib08d/Adafruit GFX Library/Adafruit_GrayOLED.cpp.o
Compiling .pio/build/d1/lib08d/Adafruit GFX Library/Adafruit_SPITFT.cpp.o
Compiling .pio/build/d1/lib08d/Adafruit GFX Library/glcdfont.c.o
In file included from .pio/libdeps/d1/Firmata/utility/SerialFirmata.cpp:20:
.pio/libdeps/d1/Firmata/utility/SerialFirmata.h:30:10: fatal error: SoftwareSerial.h: No such file or directory
************************************************************************
* Looking for SoftwareSerial.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:SoftwareSerial.h"
* Web > https://registry.platformio.org/search?q=header:SoftwareSerial.h
*
************************************************************************
30 | #include <SoftwareSerial.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/d1/lib8d6/Adafruit ILI9341/Adafruit_ILI9341.cpp.o
*** [.pio/build/d1/lib1ff/Firmata/utility/SerialFirmata.cpp.o] Error 1
.pio/libdeps/d1/ESP8266WebServer/src/ESP8266WebServer.cpp: In member function 'void ESP8266WebServer::handleClient()':
.pio/libdeps/d1/ESP8266WebServer/src/ESP8266WebServer.cpp:168:43: warning: 'WiFiClient WiFiServer::available(uint8_t*)' is deprecated: Renamed to accept(). [-Wdeprecated-declarations]
168 | WiFiClient client = _server.available();
| ^
In file included from .pio/libdeps/d1/ESP8266WebServer/src/ESP8266WebServer.cpp:26:
/Users/rschaller/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src/WiFiServer.h:85:14: note: declared here
85 | WiFiClient available(uint8_t* status = NULL) __attribute__((deprecated("Renamed to accept().")));
| ^~~~~~~~~
In file included from .pio/libdeps/d1/ESP8266WebServer/src/ESP8266WebServer.cpp:28:
.pio/libdeps/d1/ESP8266WebServer/src/ESP8266WebServer.h: In instantiation of 'size_t ESP8266WebServer::streamFile(T&, const String&) [with T = fs::File; size_t = unsigned int]':
.pio/libdeps/d1/ESP8266WebServer/src/detail/RequestHandlersImpl.h:114:41: required from here
.pio/libdeps/d1/ESP8266WebServer/src/ESP8266WebServer.h:137:30: warning: 'size_t WiFiClient::write(Stream&)' is deprecated: use stream.sendHow(client...) [-Wdeprecated-declarations]
137 | return _currentClient.write(file);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from .pio/libdeps/d1/ESP8266WebServer/src/ESP8266WebServer.cpp:27:
/Users/rschaller/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src/WiFiClient.h:75:10: note: declared here
75 | size_t write(Stream& stream);
| ^~~~~
I was told by an experienced member of the community that SoftwareSerial.h is part of the core and shouldn’t create any problems. There goes that word, shouldn’t
On the third installation, Raspberry Pi5, here is what is reported:
Processing d1 (platform: espressif8266; board: d1; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------
Library Manager: Installing ayushsharma82/EasyDDNS @ ^1.8.0
Unpacking [####################################] 100%
Library Manager: EasyDDNS@1.8.0 has been installed!
Library Manager: Installing bodmer/TFT_eSPI @ ^2.5.43
Unpacking [####################################] 100%
Library Manager: TFT_eSPI@2.5.43 has been installed!
Library Manager: Installing adbancroft/avr-fast-shift @ ^1.1.0
Unpacking [####################################] 100%
Library Manager: avr-fast-shift@1.1.0 has been installed!
Library Manager: Installing firmata/Firmata @ ^2.5.9
Unpacking [####################################] 100%
Library Manager: Firmata@2.5.9 has been installed!
Library Manager: Installing knolleary/PubSubClient @ ^2.8
Unpacking [####################################] 100%
Library Manager: PubSubClient@2.8.0 has been installed!
Library Manager: Installing adafruit/Adafruit Unified Sensor @ ^1.1.14
Unpacking [####################################] 100%
Library Manager: Adafruit Unified Sensor@1.1.14 has been installed!
Library Manager: Installing thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays @ ^4.6.1
Unpacking [####################################] 100%
Library Manager: ESP8266 and ESP32 OLED driver for SSD1306 displays@4.6.1 has been installed!
Library Manager: Installing adafruit/Adafruit BME280 Library @ ^2.2.4
Unpacking [####################################] 100%
Library Manager: Adafruit BME280 Library@2.2.4 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing Adafruit BusIO
Unpacking [####################################] 100%
Library Manager: Adafruit BusIO@1.16.2 has been installed!
Library Manager: Installing git+https://github.com/esp8266/ESPWebServer.git
git version 2.39.5
Cloning into '/home/pi/.platformio/.cache/tmp/pkg-installing-6h6_jd56'...
remote: Enumerating objects: 36, done.
remote: Counting objects: 100% (36/36), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 36 (delta 0), reused 21 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (36/36), 210.71 KiB | 784.00 KiB/s, done.
Library Manager: ESP8266WebServer@1.0.0+sha.61cc811 has been installed!
Library Manager: Installing adafruit/Adafruit ILI9341 @ ^1.6.1
Unpacking [####################################] 100%
Library Manager: Adafruit ILI9341@1.6.1 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing Adafruit GFX Library
Unpacking [####################################] 100%
Library Manager: Adafruit GFX Library@1.11.11 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing Adafruit STMPE610
Unpacking [####################################] 100%
Library Manager: Adafruit STMPE610@1.1.6 has been installed!
Library Manager: Installing Adafruit TouchScreen
Unpacking [####################################] 100%
Library Manager: Adafruit TouchScreen@1.1.5 has been installed!
Library Manager: Installing Adafruit TSC2007
Unpacking [####################################] 100%
Library Manager: Adafruit TSC2007@1.1.2 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing Adafruit SH110X
Unpacking [####################################] 100%
Library Manager: Adafruit SH110X@2.1.11 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing git+https://github.com/PaulStoffregen/Time.git
git version 2.39.5
Cloning into '/home/pi/.platformio/.cache/tmp/pkg-installing-51mr9lod'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 38 (delta 2), reused 25 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (38/38), 26.01 KiB | 887.00 KiB/s, done.
Resolving deltas: 100% (2/2), done.
Library Manager: Time@1.6.1+sha.a18e50d has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1.html
PLATFORM: Espressif 8266 (4.2.1) > WEMOS D1 R1
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 @ 3.30102.0 (3.1.2)
- tool-esptool @ 1.413.0 (4.13)
- tool-esptoolpy @ 1.30000.201119 (3.0.0)
- toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Library Manager: Installing Adafruit_BME280_Library-master
Warning! Could not find the package with 'Adafruit_BME280_Library-master' requirements for your system 'linux_aarch64'
Found 54 compatible libraries
Scanning dependencies...
Dependency Graph
|-- EasyDDNS @ 1.8.0
|-- TFT_eSPI @ 2.5.43
|-- avr-fast-shift @ 1.1.0
|-- Firmata @ 2.5.9
|-- PubSubClient @ 2.8.0
|-- Adafruit Unified Sensor @ 1.1.14
|-- ESP8266 and ESP32 OLED driver for SSD1306 displays @ 4.6.1
|-- Adafruit BME280 Library @ 2.2.4
|-- ESP8266WebServer @ 1.0.0+sha.61cc811
|-- Adafruit ILI9341 @ 1.6.1
|-- Time @ 1.6.1+sha.a18e50d
|-- ESP8266HTTPClient @ 1.2
|-- Adafruit GFX Library @ 1.11.11
|-- ArduinoOTA @ 1.0
|-- EEPROM @ 1.0
|-- ESP8266WiFi @ 1.0
|-- Wire @ 1.0
Building in release mode
Compiling .pio/build/d1/src/MotionBME280_v11.cpp.o
Generating LD script .pio/build/d1/ld/local.eagle.app.v6.common.ld
src/MotionBME280_v11.cpp:1:10: fatal error: Time.h: No such file or directory
**************************************************************
* Looking for Time.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:Time.h"
* Web > https://registry.platformio.org/search?q=header:Time.h
*
**************************************************************
1 | #include <Time.h>
| ^~~~~~~~
compilation terminated.
*** [.pio/build/d1/src/MotionBME280_v11.cpp.o] Error 1
Compiling .pio/build/d1/lib46a/ESP8266WiFi/BearSSLHelpers.cpp.o
Any help on this confusing situation would be greatly appreciated - Rob