Hello, I am working with PlatformIO and VS Code in managing multiple projects based on either esp32 or stm32. Some of the projects are quite some years old and I am curious if there is any way I can specify what version of the framework (stm32cube, or esp32) I need in platformio.ini. I know you can specify library version. But how do I specify library version for the libraries provided by the framework?
I mean the version for all the tools that are listed once you press Platformio → Dependendencies → List
This is best done by pinning the platform version. For example, the current used platform version should be visible in the first few lines of the build log (“PLATFORM: STSTM32 (16.1.0)” or whatever). Per documentation you can write
platform = email@example.com
then in the platformio.ini to pin the platform version. By pinning the platform version, you automatically pin the framework packages (and other used packages), such as for platform 16.1.0 that “Arduino STM32 Core 2.5.0” is used.
Further info can be found it in a platform’s release notes (example) or in the above shown platform.json.
The same principle works on platform = firstname.lastname@example.org.