Different versions of the platform/packages depending on the project - how to

hi,

So I have a project(s) that I need different packages/platforms:

first, while compiling shows me:

PACKAGES:
  • framework-arduinoespressif32 @ 3.20017.241212+sha.dcc1105b
    
  • tool-esptoolpy @ 2.40900.250804 (4.9.0)
    
  • toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
    
  • toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5LDF: Library Dependency Finder → LDF Modes: Finder ~ chain, Compatibility ~ softFound 39 compatible librariesScanning dependencies…Dependency Graph
    

second:

PACKAGES:
  • framework-arduinoespressif32 @ 2.0.9
    
  • tool-esptoolpy @ 1.40602.0 (4.6.2)
    
  • tool-mklittlefs @ 1.203.210628 (2.3)
    
  • tool-mkspiffs @ 2.230.0 (2.30)
    
  • toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
    
  • toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5LDF: Library Dependency Finder → LDF Modes: Finder ~ chain, Compatibility ~ softFound 37 compatible librariesScanning dependencies…Dependency Graph
    

I am not able to understand how I can for exactly these packages using platformio.ini - today what I am doing is total BS: I have 2 different .platformio-2 and .platformio-3 folders and I link them to .platformio folder

I know it could be better organised but I am not sure what to put where in platformio.ini

I see this part of the documentation:

[env:exact_version]
platform = platformio/espressif32@6.1.0


but what exactly am I supposed to put there (as version) to get exactly what I showed above, meaning:

1- framework-arduinoespressif32 @ 3.20017.241212+sha.dcc1105b

2- framework-arduinoespressif32 @ 2.0.9

I would be great if you help me

thank you

All you have to do is to specify the desired platform version. PlatformIO will automatically download the necessary files and manage the tools, platform and framework files for you.

For example:
platform = espressif32 @ 6.12.0 → Espressif Arduino 2.0.17 based on ESP-IDF 4.4.7

platform = espressif32 @ 6.3.0 → Espressif Arduino 2.0.9 based on ESP-IDF 4.4.4

See my list of available espressif32 platform versions including pioarduino’s Arduino 3.x versions here

1 Like

thank you @sivar2311

and I can do it per default_envs even, right? or per board etc?

You can put it into common or working environment - See Section [env] — PlatformIO latest documentation

1 Like