I want to use an Arduino sketch running on an ESP32 Pico Kit V.4. The original author uses the first generation of the Arduino development framework. In the Board Manager he specifies to install V. 2.0.17 of “esp32 by Espressif Systems”, because in the current version (3.3.5 or so) the updated drivers do not match his code. After proceeding as described everything works fine.
For continuous development I prefer Platformio over the rather too simple Arduino environment. Looking in my .platformio/packages folder I find several arduinoespressif32 subfolders containing versions like 3.10004.210126, 3.10006.210326, 3.20009.0 and seemingly the latest one 3.20016.0, but none like 2.something. Is it possible to install specific version 2.0.17? If yes: how? And to use it: Is it sufficient to include a statement in platformio.ini like “platform = espressif32@2.0.17”?
The maximum version supported by PlatformIO is 2.0.17 (unfortunately).
If you need Espressif Arduino 3.x you have to use pioarduino (a community fork).
See this list of available espressif32 platform versions and their Arduino Framework versions:
So using platform = espressif32 @ 6.12.0 will give you the latest official espressif32 platform by PlatformIO using Espressif32 Arduino Framework 2.0.17.
Good choice!
In PlatformIO the platform- and library versions are specified per project.
This allows you to have another project using the latest pioarduino espressif32 platform / Arduino Framework 3.3.5 at the same time.
You write “The maximum version supported by PlatformIO is 2.0.17”. Great! That’s exactly what I need. So I modified the platform.ini with the line platform = espressif32 @ 6.12.0 and tried to build the project. PIO was busy for quite some time, and I got another folder under .platformio/packages. Looks great!
However I got error messages in the build log such as
File “C:\Users\Peter.platformio\packages\tool-esptoolpy\esptool\bin_image.py”, line 16, in from intelhex import HexRecordError, IntelHex ModuleNotFoundError: No module named ‘intelhex’
More error messages refer to the Arduino source code such as missing I2S support which I didn’t encounter in the Arduino development environment. This is something that I have to sort out myself. But what can I do to get rid of the Python error(s)?
You are 100% correct! I renamed %USWERPROFILE%\.platformio\packages and restarted VS Code. It worked for quite some time! But then I could compile my project without errors. You saved my day - thank you!