First of all: Platform IO is really revolutionary and helpful and I use it every day.
As I’m using the ESP32 I can use the Arduino framework or the ESP-IDF or both!
But these frameworks are changing a lot and using the defaults you’re stuck with ESP-IDF 3.3 which is more then a year old.
It was possible to use a special branch (idf-release/v4.0) of the arduino espressif repo but this branch was deleted and it is still unclear what the solution is.
More info: espidf-arduino-blink example uncompilable because of missing branch · Issue #524 · platformio/platform-espressif32 · GitHub
No information of the breaking change can be found in the docs! New users will be in trouble right away!
I want to stress that is it vital to be able to use staging versions of these frameworks so I thinks this must be fixed ASAP!
Absolutely, I see it the same way. I’ve left another comment in the issue for @valeros
Thanks Max, fingers crossed then…
After many months being out in the dark with ESP32 on Platformio, with only a small lifeline from Marco van Noord (god bless him), there is finally some light at the end of the tunnel:
opened 10:01PM - 21 Jul 21 UTC
closed 10:17AM - 22 Jul 21 UTC
Make your question, not a Statement, inclusive. Include all pertinent informatio… n:
What you are trying to do?
Compiling an Arduino sketch in PlatformIO using the latest 2.0.0 RC1 release
Describe your system( Hardware, computer, O/S, core version, environment).
Windows 10 x64 version 20H2, Visual Studio Code 1.58.2, PlatformIO Core 5.1.1
I wanted to get latest version that has a patch for issue #3659, therefore I modified my platformio.ini project file with these environment variables:
```
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
platform_packages =
toolchain-xtensa32 @ ~2.80400.0
framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.0-rc1
```
Then compiling fails. I cleaned up, as well as closed and restarted Visual Studio Code. It looks like wrong compiler.
I tried to remove the toolchain-xtensa32 line in platformio.ini, and different errors appear.
I have platform Espressif32 2.1.0 installed, shouldn't it pick up the latest SDK and compiler?
Thank you in advance for your support
Nick
This is the compiler output:
Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (2.1.0) > Espressif ESP32 Dev Module
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 0.0.0+sha.4ada3f5
- tool-esptoolpy 1.30000.201119 (3.0.0)
- toolchain-xtensa32 2.80400.210211 (8.4.0)
Converting PSC-Gen2-FirmwareESP32.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 44 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Adafruit Unified Sensor> 1.1.4
|-- <Adafruit BME280 Library> 2.1.2
| |-- <Adafruit Unified Sensor> 1.1.4
| |-- <SPI> 2.0.0
| |-- <Wire> 2.0.0
|-- <Adafruit ADXL343> 1.3.0
| |-- <Adafruit BusIO> 1.7.1
| | |-- <Wire> 2.0.0
| | |-- <SPI> 2.0.0
| |-- <Wire> 2.0.0
| |-- <SPI> 2.0.0
| |-- <Adafruit Unified Sensor> 1.1.4
|-- <PMS Library> 1.1.0
|-- <Time> 1.6.0
|-- <Adafruit MCP23008 library> 2.1.0
| |-- <Adafruit BusIO> 1.7.1
| | |-- <Wire> 2.0.0
| | |-- <SPI> 2.0.0
| |-- <Wire> 2.0.0
| |-- <SPI> 2.0.0
|-- <ArduinoJson> 6.17.2
|-- <Adafruit SI1145 Library> 1.1.1
| |-- <Wire> 2.0.0
|-- <AsyncTCP-esphome> 1.1.1
|-- <RunningMedian> 0.3.3
|-- <AsyncElegantOTA> 2.2.5
| |-- <AsyncTCP-esphome> 1.1.1
| |-- <ESP Async WebServer> 1.2.3
| | |-- <AsyncTCP-esphome> 1.1.1
| | |-- <FS> 2.0.0
| | |-- <WiFi> 2.0.0
| | |-- <ArduinoJson> 6.17.2
| |-- <FS> 2.0.0
| |-- <Update> 2.0.0
| |-- <WiFi> 2.0.0
|-- <ESP Async WebServer> 1.2.3
| |-- <AsyncTCP-esphome> 1.1.1
| |-- <FS> 2.0.0
| |-- <WiFi> 2.0.0
| |-- <ArduinoJson> 6.17.2
|-- <HTTPClient> 2.0.0
| |-- <WiFi> 2.0.0
| |-- <WiFiClientSecure> 2.0.0
| | |-- <WiFi> 2.0.0
|-- <WiFi> 2.0.0
Building in release mode
Compiling .pio\build\esp32dev\src\PSC-Gen2-FirmwareESP32.ino.cpp.o
Compiling .pio\build\esp32dev\src\src\EspSoftwareSerial\src\SoftwareSerial.cpp.o
Compiling .pio\build\esp32dev\src\src\ModbusMaster\src\ModbusMaster.cpp.o
Generating partitions .pio\build\esp32dev\partitions.bin
Compiling .pio\build\esp32dev\libd10\Adafruit Unified Sensor\Adafruit_Sensor.cpp.o
Compiling .pio\build\esp32dev\lib0a4\SPI\SPI.cpp.o
Compiling .pio\build\esp32dev\libc5a\Wire\Wire.cpp.o
Compiling .pio\build\esp32dev\lib00b\Adafruit BME280 Library\Adafruit_BME280.cpp.o
Compiling .pio\build\esp32dev\lib1ed\Adafruit BusIO\Adafruit_BusIO_Register.cpp.o
Compiling .pio\build\esp32dev\lib1ed\Adafruit BusIO\Adafruit_I2CDevice.cpp.o
Compiling .pio\build\esp32dev\lib1ed\Adafruit BusIO\Adafruit_SPIDevice.cpp.o
Compiling .pio\build\esp32dev\lib91f\Adafruit ADXL343\Adafruit_ADXL343.cpp.o
Archiving .pio\build\esp32dev\libc5a\libWire.a
Archiving .pio\build\esp32dev\libd10\libAdafruit Unified Sensor.a
Archiving .pio\build\esp32dev\lib0a4\libSPI.a
Compiling .pio\build\esp32dev\lib5a7\PMS Library\PMS.cpp.o
Compiling .pio\build\esp32dev\libc14\Time\DateStrings.cpp.o
Archiving .pio\build\esp32dev\lib1ed\libAdafruit BusIO.a
Archiving .pio\build\esp32dev\lib00b\libAdafruit BME280 Library.a
Compiling .pio\build\esp32dev\libc14\Time\Time.cpp.o
Compiling .pio\build\esp32dev\libce0\Adafruit MCP23008 library\Adafruit_MCP23008.cpp.o
Archiving .pio\build\esp32dev\lib1b5\libArduinoJson.a
Compiling .pio\build\esp32dev\libb32\Adafruit SI1145 Library\Adafruit_SI1145.cpp.o
Compiling .pio\build\esp32dev\libdca\AsyncTCP-esphome\AsyncTCP.cpp.o
Compiling .pio\build\esp32dev\lib32a\RunningMedian\RunningMedian.cpp.o
Archiving .pio\build\esp32dev\libce0\libAdafruit MCP23008 library.a
Archiving .pio\build\esp32dev\libc14\libTime.a
Archiving .pio\build\esp32dev\lib5a7\libPMS Library.a
Archiving .pio\build\esp32dev\lib91f\libAdafruit ADXL343.a
Compiling .pio\build\esp32dev\libc04\FS\FS.cpp.o
Compiling .pio\build\esp32dev\libc04\FS\vfs_api.cpp.o
Compiling .pio\build\esp32dev\lib80d\WiFi\ETH.cpp.o
Compiling .pio\build\esp32dev\lib80d\WiFi\WiFi.cpp.o
Archiving .pio\build\esp32dev\libb32\libAdafruit SI1145 Library.a
Compiling .pio\build\esp32dev\lib80d\WiFi\WiFiAP.cpp.o
Compiling .pio\build\esp32dev\lib80d\WiFi\WiFiClient.cpp.o
Compiling .pio\build\esp32dev\lib80d\WiFi\WiFiGeneric.cpp.o
Compiling .pio\build\esp32dev\lib80d\WiFi\WiFiMulti.cpp.o
Archiving .pio\build\esp32dev\lib32a\libRunningMedian.a
Compiling .pio\build\esp32dev\lib80d\WiFi\WiFiSTA.cpp.o
Compiling .pio\build\esp32dev\lib80d\WiFi\WiFiScan.cpp.o
Archiving .pio\build\esp32dev\libdca\libAsyncTCP-esphome.a
Compiling .pio\build\esp32dev\lib80d\WiFi\WiFiServer.cpp.o
Compiling .pio\build\esp32dev\lib80d\WiFi\WiFiUdp.cpp.o
Compiling .pio\build\esp32dev\libaa7\ESPAsyncWebServerFixed\AsyncEventSource.cpp.o
Archiving .pio\build\esp32dev\libc04\libFS.a
Compiling .pio\build\esp32dev\libaa7\ESPAsyncWebServerFixed\AsyncWebSocket.cpp.o
Compiling .pio\build\esp32dev\libaa7\ESPAsyncWebServerFixed\SPIFFSEditor.cpp.o
Compiling .pio\build\esp32dev\libaa7\ESPAsyncWebServerFixed\WebAuthentication.cpp.o
Compiling .pio\build\esp32dev\libaa7\ESPAsyncWebServerFixed\WebHandlers.cpp.o
Compiling .pio\build\esp32dev\libaa7\ESPAsyncWebServerFixed\WebRequest.cpp.o
Compiling .pio\build\esp32dev\libaa7\ESPAsyncWebServerFixed\WebResponses.cpp.o
Compiling .pio\build\esp32dev\libaa7\ESPAsyncWebServerFixed\WebServer.cpp.o
Compiling .pio\build\esp32dev\lib2db\Update\HttpsOTAUpdate.cpp.o
Archiving .pio\build\esp32dev\lib80d\libWiFi.a
Compiling .pio\build\esp32dev\lib2db\Update\Updater.cpp.o
Archiving .pio\build\esp32dev\lib7fb\libAsyncElegantOTA.a
Compiling .pio\build\esp32dev\lib76a\WiFiClientSecure\WiFiClientSecure.cpp.o
Compiling .pio\build\esp32dev\lib76a\WiFiClientSecure\ssl_client.cpp.o
Compiling .pio\build\esp32dev\libff2\HTTPClient\HTTPClient.cpp.o
Archiving .pio\build\esp32dev\libFrameworkArduinoVariant.a
Compiling .pio\build\esp32dev\FrameworkArduino\Esp.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\HardwareSerial.cpp.o
Archiving .pio\build\esp32dev\lib2db\libUpdate.a
Compiling .pio\build\esp32dev\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\IPv6Address.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\MD5Builder.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\Print.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\StreamString.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\USB.cpp.o
Archiving .pio\build\esp32dev\lib76a\libWiFiClientSecure.a
Compiling .pio\build\esp32dev\FrameworkArduino\USBCDC.cpp.o
Archiving .pio\build\esp32dev\libaa7\libESPAsyncWebServerFixed.a
Compiling .pio\build\esp32dev\FrameworkArduino\WMath.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\WString.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\base64.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\cbuf.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-adc.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-bt.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-cpu.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-dac.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-gpio.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-i2c.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-ledc.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-psram.c.o
Archiving .pio\build\esp32dev\libff2\libHTTPClient.a
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-sigmadelta.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-spi.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-time.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-timer.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-tinyusb.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-touch.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-uart.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\libb64\cdecode.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\libb64\cencode.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\main.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\stdlib_noniso.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\wiring_pulse.c.o
Compiling .pio\build\esp32dev\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\esp32dev\libFrameworkArduino.a
Linking .pio\build\esp32dev\firmware.elf
c:/users/proprietario/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: final link failed: bad value
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32dev\firmware.elf] Error 1
===================================================== [FAILED] Took 36.53 seconds =====================================================The terminal process "C:\Users\proprietario\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'esp32dev'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.