Multiple frameworks in platformio.ini possible?

In most of the cases, using one framework or the other is an exclusive choice and not combinable.

ESP-IDF and Arduino is however an exception. There is indeed “Arduino as a component in ESP-IDF”. The official example for this is listed, as always in the documentation.

The magic line is

framework = arduino, espidf

in the platformio.ini. It might also require the usage of the latest, bleeding edge upstream platform-espressif32 version. See here for how to do this.

2 Likes