PlatformIO Community

Custom framework and toolset for Arduino ESP8266 3.0.0

Hi,

I am trying to get esp8266 framework v3.0.0 to work. I’ve got it working in classic Arduino IDE, but I want to use it in Platform IO, as I love both VSCode and PIO. But unfortunately, it seems like framework is working OK, but the tools do not change - in result I’m getting compilation errors about C++17.

Repro steps are:

  1. Create new empty project for Wemos D1 Mini, for ESP8266 Arduino Platform
  2. Add custom framework to platformio.ini

[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git

  1. Try to compile
  2. Get
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: <I cannot post links....>
PLATFORM: Espressif 8266 2.6.2 > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 e636a65
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.20800.0 (2.8.0)
 - tool-mklittlefs 1.203.200522 (2.3)
 - tool-mkspiffs 1.200.0 (2.0)
 - toolchain-xtensa 2.40802.200502 (4.8.2)
LDF: Library Dependency Finder -> <I cannot post links....>
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 43 compatible libraries
Scanning dependencies...     
No dependencies
Building in release mode
Generating .pio\build\d1_mini\core\core_version.h
Generating LD script .pio\build\d1_mini\ld\local.eagle.app.v6.common.ld
Archiving .pio\build\d1_mini\libFrameworkArduinoVariant.a
fatal: No names found, cannot describe anything.
Compiling .pio\build\d1_mini\FrameworkArduino\StackThunk.cpp.o
Compiling .pio\build\d1_mini\FrameworkArduino\WMath.cpp.o
xtensa-lx106-elf-g++: error: unrecognized command line option '-std=gnu++17'
xtensa-lx106-elf-g++: error: unrecognized command line option '-std=gnu++17'
Compiling .pio\build\d1_mini\FrameworkArduino\cbuf.cpp.o
Compiling .pio\build\d1_mini\FrameworkArduino\cont.S.o
xtensa-lx106-elf-g++: error: unrecognized command line option '-std=gnu++17'
Compiling .pio\build\d1_mini\FrameworkArduino\cont_util.cpp.o
*** [.pio\build\d1_mini\FrameworkArduino\StackThunk.cpp.o] Error 1
*** [.pio\build\d1_mini\FrameworkArduino\WMath.cpp.o] Error 1
*** [.pio\build\d1_mini\FrameworkArduino\cbuf.cpp.o] Error 1
xtensa-lx106-elf-g++: error: unrecognized command line option '-std=gnu++17'
*** [.pio\build\d1_mini\FrameworkArduino\cont_util.cpp.o] Error 1

Is there a way to force custom tools as well?

You are already doing this for the framework.

See docs. The used compiler is still

So just lookup available versions at bintray and e.g. say

[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
platform_packages =
   framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
   toolchain-xtensa@2.100100.200706

to give you GCC 10.1.0.

This is exactly what I was looking for! Awesome, thank you very much. I just didn’t know what to specify after the @