Changing the menuconfig for Arduino IDE using esptool.py for Uploading esp32 firmware?

The question here shows how one can excess the building process with the esptool. For a project I need to make further adjustments in the menuconfig or sdkconfig to set low energy settings for BLE of my esp32c3. @tanmanh0707 mentions in the end of that question that he generated a new esptool.exe with esp.py . How can I do that and change the menuconfig?

Welcome! Your question is cryptic and I am not sure what you are asking but if it involves changing the IDE the answer is yes. The Arduino IDE 2.0 is open source and its source code is hosted on GitHub.

Hello, as per my understanding, menuconfig and sdkconfig are not applied to Arduino platform. They are used in ESP-IDF.

If you change any configuration in menuconfig or sdkconfig, in VSCode, you can press Ctrl + Shift + P and type

esp-idf: dispose Current SDK

, then recompile the project, it will then apply your modifications. Nothing to do with esptool.

Hi guys. Thank u so much for your quick answer and excuse my confusing question. @gilshultz when you complile projects for e.g. the ESP32C3 the arduino IDE compiles documentes that will be flashed via the ESP tool and I want to edit that process where the config for the ESP32C3 is generated.

@tanmanh0707 Ok I will try that. Intresting that this is "saved" globally when you do it in VSCode in the ESP-IDF. Do you know why you have to dispose it before recompiling with Arduino IDE? It is clearing the cache of the fast access config according to here

I also found another possible workaround using the Arduino as an ESP-IDF component. This allows you to use the Arduino framework in your ESP-IDF projects with the full flexibility of the ESP-IDF.

I meant recompile with esp-idf, not Arduino IDE. I have not tried "Arduino as an ESP-IDF component" before.

The reason why it has to dispose before recompiling is that, in the previous build, your sdk's objects file has been compiled with previous configuration. If you just changed the config, the object files will not be re-compiled. Once you dispose the SDK Configuration, it will then recompile all objects in the next build. The cache remains your old configuration, that's why we need to clear it.

I missed one thing in previous post, after disposing the SDK Configuration, you need to add your adjustments to menuconfig or sdkconfig, then you can recompile the project.