Conversion from Arduino IDE to PlatformIO


I’m trying to convert my code from arduino Ide to PlatformIO,
When I build in the arduino ide:

I have an output:
The draft uses 1868233 bytes (95%) of the program’s storage space. The maximum is 1966080 bytes.
Global variables use 58688 bytes (17%) of dynamic memory, leaving 268992 bytes for local variables. The maximum is 327680 bytes.

->PlatformIO settings

I have an output:

Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
Error: The program size (1972922 bytes) is greater than maximum allowed (1966080 bytes)
RAM: [== ] 19.9% (used 65088 bytes from 327680 bytes)
*** [checkprogsize] Explicit exit, status 1
Flash: [==========] 100.3% (used 1972922 bytes from 1966080 bytes)

I would like your help to be able to compile on PlatformIO

What Arduino-ESP32 version are you using in the Arduino IDE? (Board manager tells you this).

PlatformIO still uses 1.0.6, not the latest 2.0.2. See Support for the latest Arduino v2.0 · Issue #619 · platformio/platform-espressif32 · GitHub for the needed modification to get a technical preview.