Explanation of Platformio's usage of sdkconfig files?

I’m working with the espidf-storage-sdcard example for a project. I noticed that the example project comes packaged with 3 sdkconfig.* files. With my prior experience with ESP-IDF, I’m familiar with the sdkconfig.defaults file and how the IDF pulls from that to make the sdkconfig file.

Is there a guide that explains what platformio does with these files?

Specifically:

  • There isn’t a sdkconfig file to be found in the root directory. How can I re-generate the file when I change something in the source file? Is it just the clean operation?
  • Is there an order of heirarchy or pulling direction when it comes to these files? As in, should I be making my changes in the sdkconfig.main file, which then gets pulled into the sdkconfig.defaults file? Or vice versa?
  • How is the suffix (or in Windows’ terms, the file type field) used? From the Espressif doc, the .main and .esp32thingy suffixes aren’t recognized by default. So, where are those defined to be looked for?

Also, when I click build using platformio, the sdkconfig.defaults file gets some edits. I’ve noticed that when I set CONFIG_EXAMPLE_SDMMC_BUS_WIDTH_1=y, something deletes the entries for CONFIG_EXAMPLE_PIN_D1 through D3.

I’d love to learn more about what is actually doing that because I was under the impression that ESP-IDF treats the sdkconfig.defaults as effectively read-only.

I’m not an expert when it comes to ESP-IDF projects. But configuration is done via menuconfig. Open a terminal window and run the command “pio run -t menuconfig