How to run "idf.py reconfigure" from within platformio

Hi All,

I am currently using an ESP32-S2 devkit with the esp-idf framework. I am trying to get the usb working on it, but in order to compile, the documentation states that i need to use the IDF component registry to install the esp_tinyusb library, as stated here how to do so.

I have noticed that the builder tool does not automatically download the packages, but as stated in the link, you need to run “idf.py reconfigure” in order to pull the packages. I accidentally stumbled on the fact that running the menuconfig command in Platformio will pull it, but that’s not a good solution for use in a CI/CD.

Any help would be appreciated!

See Espressif IoT Development Framework — PlatformIO latest documentation

If you use PlatformIO IDE for VSCode, there is also a shortcut in the Project Tasks.

Hi,

Thanks for the response. I am aware of how to configure the esp_idf in platformIO. What I am more looking for is how to run the command to download external libraries from the IDF Component manager? I have created the idf_components.yml file with the following content:

## IDF Component Manager Manifest File
dependencies:
  esp_tinyusb:
    version: "~1.2.0"
    rules:
      - if: "target in [esp32s2]"

And according to the idf documentation I posted in my first post, you need to run:

idf.py reconfigure

But of course, platformio obscures access to the idf.py script. So I was wondering if there is a built-in way to run that command in platformio, like with the menuconfig command?

I would just download the library and store it permanently in my project, but the main issue with that approach is that I may not want that library for a given build, since the USB lib does not work for the regular ESP32.

1 Like

Did you ever find a solution to this? I have the same issue where I need to download dependencies.

Was a solution found? Can anyone confirm if idf.py is supposed be run in a terminal inside PlatformIO? I just get command not found error when I try to run idf.py. I need to run idf.py to add external library dependencies to IDF. Specifically, I need to add the esp_littlefs to a project. Any help would be appreciated.

Just a follow up after some more digging. Still no answer on running idf.py in PlatformIO. It’s too bad given the vast amount of IDF docs relying on it. However, for adding LittleFS, I found the extra components support mechanism in PlatformIO and was able to do it without using idf.py.