PlatformIO Community

ESP32 with ESP-IDF: Build dependencies


how are build dependencies for the ESP-IDF frameworks computed? Currently using ESP-IDF in PlatformIO is rather annoying as building the whole IDF take ~5 minutes to compile. This would be fine, if it compiled once, however it recompiles on:

  • adding a file to a project (why? There is no dependency of IDF on project files)
  • modifying platformio.ini (it would be nice not to recompile if e.g. only upload or debug options are changed, however I get is is quite complicated)
  • IDE restart

Also, if a dependency is triggered, the whole IDF gets recompiled even it is not necessary (e.g., on modification of a header file).

Would it be possible to implement build dependencies properly or at least to disable build of some parts of IDF (e.g., bluetooh)?


PlatformIO Core has incremental build system. It means that we don’t recompile whole project on the each change in a source file. There are only a few cases where we do full re-building:

If you change a project structure, we don’t know a real state of C/C++ Preprocessor which can lead to the problems if you use the same name for header file and move it between different levels.


Thank you for your response; I see that PlatformIO uses SCons to build projects, however, I think there is a wrong dependency in PlatformIO somewhere. Adding a file into a project should not reompile ESP-IDF as it does not depend on the user headers.