Esp32 menuconfig

Hi there. Im new to platformio using esp-idf to program an esp32. Everything seems nice. However, the lack of make menuconfig makes things a bit more difficult. Is there any plans to change this in the near future?
Thanks in advance.


Maybe editing sdkconfig.h directly is a suitable workaround?

There are a couple other folks using their own spin on VS Code to bring up menuconfig. Why is PlatformIO not able to do this.

Links? Sure, I could just google it, but if you want to bring it up, it would be nice if you link to what you’re talking about! :wink:

Sure. I’ll give you 4 (well technically 3 the last one is a screenshot of mine)
#1) GitHub - Deous/VSC-Guide-for-esp32: This is a guide showing how to setup esp32 freeRTOS project on Windows
#2) GitHub - botofancalin/Esp32_debug_template: A template project for debugginf esp-idf projects on VsCode
#3) Espressif IDF - Visual Studio Marketplace

Mine uses the new Cmake, and everything works just fine. If i knowing barley nothing on how to implement things in VS Code, I cannot see how PlatforIO can’t do it when they are clearly far smarter in this avenue than I.

I think menuconfig is part of native ESP32 build system. PlatformIO uses its own, maybe it makes bringing menuconfig trickier than it seems.

1 Like

It’s possible. but if your going to include a platform then It should support all the features. Menuconfig is a very important part of the ESP32 platform.

I agree in principle, but I suspect it’s because they don’t want to have to patch the ESP-IDF every release to remove checks present there… ie. if you actually run menuconfig on PIO… you get

python $HOME\.platformio\packages\framework-espidf\tools\ menuconfig

Setting IDF_PATH environment variable: C:\Users\Peter\.platformio\packages\framework-espidf
Checking Python dependencies...
The following Python requirements are not satisfied:
Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required packages.
Alternatively, you can run "C:\\Users\\Peter\\.platformio\\penv\\Scripts\\python.exe -m pip install -r C:\\Users\\Peter\\.platformio\\packages\\framework-espidf\\requirements.txt" for resolving the issue.

Now, fair enough, that can probably be worked around by installing the missing dependencies in the PlatformIO virtualenv, but then you’ll hit something like …

'cmake' must be available on the PATH to use

… if you disable that check, you get …

CMakeLists.txt not found in project directory

… if you make an empty one so it exists, you get…

To use, either the 'ninja' or 'GNU make' build tool must be available in the PATH

… etc, etc, etc… in other words, there are that many dependencies on the build system used in what you would otherwise think was a simple menu configuration script that it’s awkward at best.

Maybe instead of menuconfig as the ESP-IDF provides it, some sort of standalone-configurator that lets you set up that sdkconfig.h as needed for a project?

I can see that point however, It looks as though your trying those commands from the terminal which is different than how they are doing it (I believe). You see they must be calling somehow behind the scenes because if they weren’t they would get the following as well.

To use, either the ‘ninja’ or ‘GNU make’ build tool must be available in the PATH

So it seems they should have no problem calling menuconfig and pushing that to a terminal window.

When you read the official ESP-IDF documentation, that is how you load it menuconfig

--- or ---

python2 menuconfig

… if you run it from a terminal, or a button on a GUI runs that command is of no consequence.

Now, if you have the cmake, ninja/make, and other dependencies installed, it will work properly. However, as azarubkin pointed out, PIO uses it’s own build system, so this isn’t going to work. IIRC, there are changes to the ESP-IDF build system in the works, which could make this a viable proposition. Until that happens, I think your only option is to setup the supported ESP-IDF toolchain, and then menuconfig will work. This is why all of the guides have something to this effect: “Install cmake, ninja build, openocd and all other tools needed to build, flash and debug the esp32” …


If you look above in thread you will notice a screen shot of my setup. I have the supported ESP-IDF toolchain installed. I (like you said) can use mencuonfig just fine.

I am unaware of any up coming changes for ESP-IDF, that would allow this, other than the release of Cmake, which they already have done. I think the issue is that PlatformIO is not using the current Cmake build system yet.

I was thinking of this post:

I don’t know if PIO will go the way of cmake - I can’t imagine that will happen since it provides it’s own build system, which is cross-platform and cross-architecture, as also being zero-configuration to install (unless something goes terribly, terribly wrong)… but that’s up to Ivan. However, judging from the ESP-IDF documentation, I do believe there will be zero effort towards cmake since the developers consider it to be in a preview state until ESP-IDF v4 is released, and PIO does not support non-release versions of toolchains.

We have finally implemented this in the latest ESP32 dev-platform. You can try it with the upstream version Espressif 32 — PlatformIO latest documentation

pio run -t menuconfig

When I run pio run -t menuconfig it displays but the up arrow and down arrow keys do not function so I am stuck on the first item. I can open the first item with [enter] and leave it with [esc], other keys work. Any ideas?

This caveat and the solution is already noted in the documentation as “Hint” and here.

1 Like