with
[env:seeed_xiao_esp32s3]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
which build_flags should i add to get the latest c++ version ?
Can i get up to std=c++20 ? or are we limited to c++17 ?
thank you guys for your help !
1 Like
Sharing my experience here.
I had issues with the official PIO ESP32 platform because it has stayed behind in terms of Espressif Arduino Core releases, especially the included gcc version.
To get a newer toolchain I switched to the open-source fork of PIO Arduino ESP32 and this works for me at c++20 level.
Here’s my platformio.ini extract
[env]
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.11.31/platform-espressif32.zip
framework = arduino
build_unflags = -std=gnu++11 -fexceptions -fno-lto
build_flags = -std=gnu++2b
-flto=auto
-g3
-Os
-I conf
-Wno-deprecated-declarations
-Wno-attributes
-Wno-maybe-uninitialized
-D CORE_DEBUG_LEVEL=0
-D CONFIG_LOG_COLORS
1 Like
gnu++2b
works fine for me using pioarduino 53.3.10 (ESP-IDF 5.3 / Arduino 3.1.0):
[env:esp32dev]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10/platform-espressif32.zip
board = esp32dev
framework = arduino
build_unflags =
-std=gnu++17
build_flags =
-std=gnu++2b
2 Likes