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!
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.
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ā ā¦
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.
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.