PlatformIO Community

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.

2 Likes

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) https://github.com/Deous/VSC-Guide-for-esp32
#2) https://github.com/botofancalin/Esp32_debug_template
#3) https://marketplace.visualstudio.com/items?itemName=espressif.esp-idf-extension

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\idf.py menuconfig

Setting IDF_PATH environment variable: C:\Users\Peter\.platformio\packages\framework-espidf
Checking Python dependencies...
The following Python requirements are not satisfied:
future>=0.15.2
cryptography>=2.1.4
pyparsing>=2.0.3,<2.4.0
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 idf.py

… 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 idf.py, 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 idf.py somehow behind the scenes because if they weren’t they would get the following as well.

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

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

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

idf.py menuconfig

--- or ---

python2 idf.py 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” …

@pfeerick,

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 idf.py 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.