Handling of ESP32 build generated sdkconfig.debug and sdkconfig.release?

I wanted to file a feature request but thought I should ask here first. My ESP32 project has a single sdkconfig.default file and the stock platformio build process generates from it sdkconfig.release and sdkconfig.debug when I build the release and debug target respectively. So far so good, and since I don’t consider sdkconfig.release and sdkconfig.debug to be source files they are in my .gitignore.

My questions:

  1. Why the generated sdkconfig.debug and sdkconfig.realase are not deleted when I clean the project?

  2. Since sdkconfig.default is the source config, how do I run a menuconfig on it? I don’t see that option for the default target.

Is it reasonable to file feature request for #1, and #2 above?

My platformio.ini

; Base
platform = espressif32
board = esp32dev
framework = espidf
monitor_speed = 115200
; Adjust to the actual serial port on your comptuer.
board_build.partitions = partitions_singleapp_large.csv
; Pathes are for IntelliSense. Notice the embded framework id in the path.
build_flags =

build_type = release

build_type = debug

I have been wondering about best practices for .gitignore as well (and also the build logic for the various esp-idf config files). I look forward to any suggestions here.

PlatformIO’s approach to the sdkconfig files is no different to the usual workflow used in the IDF build system. All sdkconfig.{ENV_NAME} files (except for sdkconfig.defaults) are autogenerated and added to the .gitignore file in most cases (if any configuration option is mandatory, then it should be moved to the sdkconfig.defaults file). The sdkconfig.* files are generated by the underlying IDF build system and are not removed each time when a project is cleaned simply because these files are not part of the build folder and changed very infrequently, see clean commands for idf.py.

1 Like

thanks for your reply. that makes sense. this is what I am .gitignoreing for now: