External library with kconfig not shown when running menuconfig from PIO tasks menu

Greetings all,

I’m creating an external library for which there is some configuration elements put in a kconfig file. From another project, I identify this library as a dependency in the platformio.ini file as follow:

board           = esp32doit-devkit-v1
framework       = espidf
monitor_filters = colorize
monitor_raw     = yes
build_flags     = -std=gnu++17
upload_speed    = 256000
upload_port     = /dev/ttyUSB0
monitor_speed   = 115200
monitor_port    = /dev/ttyUSB0
lib_ldf_mode    = chain+
lib_compat_mode = strict
lib_deps = https://github.com/turgu1/esp32-simple-iot-framework.git

I’ve tried naming the kconfig file as Kconfig, Kconfig.projbuild, putting the file in both the root folder of the library and inside the src/ folder, I can’t get the configuration elements shown in the menuconfig display.

The library is Here

So my question is: What is the proper way of defining kconfig in an external library such that it will appears in menuconfig?


1 Like


Thanks max,

From the link you provided, it seems that this issue has not been resolved yet. Am I correct?

I tried to add the following to the main CMakeList.txt file of the project, as proposed here, but it doesn’t work either:


I’m clueless. I will then copy the content of the Kconfig to the project’s Kconfig.projbuild then, unless there is a better solution!



Well usually you don’t add ESP-IDF libraries via lib_deps but as a component, so have you tried creating a components folder in the project and clone your library in there? Like the example does.

At first, it was a library created following the PIO documentation as described here. Seeing that I was not able to have Kconfig to appear in menuconfig, I’ve added the other ESP-IDF required files to try to find a solution.

I’ve tried to move the library in a folder under components (and removed the lib_deps line in platformio config file). Now, I can’t get the PIO Run menuconfig command in the menu. :roll_eyes:

I’ve returned back to a clean external library (in the PIO senses) as I removed the CMakeLists files and the library.property file, and returned back with the lib_deps line in the platformio config file. Still not working.

I prefer keeping the library out of the targeted project, as there is a lot of modifications to do and many projects will need access to the library. Hope that a solution will come through a future update to PIO.

Thanks for you help!!

P.S.: I understand that PlatfomIO is an Ukrainian project. I hope that this war will end soon as those people are suffering a lot. This is nonsense.

Hello everybody. Just noticed exactly the same behavior. It would be really nice to have library’s Kconfig file discoverable by menu config. I was wondering if there is a potential workaround? Thanks!