who or which utility writes Kconfig.projbuild ?

chriskuku
Posts: 9
Joined: Fri Mar 29, 2024 5:49 pm

who or which utility writes Kconfig.projbuild ?

Postby chriskuku » Wed Apr 17, 2024 1:41 pm

As the subject says:

I created an empty project dir using Vscode/ESP-32. Comparing the created directory and file structure with an existing example project from esp-idf/examples/peripherals... it does not contain a file main/Kconfig.projbuild.

How can one generate this file. For the moment I copied over the file from an existing project:

Code: Select all

menu "Example Configuration"

    choice EXAMPLE_LCD_CONTROLLER
        prompt "LCD controller model"
        default EXAMPLE_LCD_CONTROLLER_ILI9341
        help
            Select LCD controller model

        config EXAMPLE_LCD_CONTROLLER_ILI9341
            bool "ILI9341"

        config EXAMPLE_LCD_CONTROLLER_GC9A01
            bool "GC9A01"

        config EXAMPLE_LCD_CONTROLLER_ST7789
            bool "ST7789"
    endchoice

    config EXAMPLE_LCD_TOUCH_ENABLED
        bool "Enable LCD touch"
        default n
        help
            Enable this option if you wish to use display touch. You can select from touch controllers.

    choice EXAMPLE_LCD_TOUCH_CONTROLLER
        prompt "LCD touch controller model"
        depends on EXAMPLE_LCD_TOUCH_ENABLED
        default EXAMPLE_LCD_TOUCH_CONTROLLER_STMPE610
        help
            Select LCD touch controller model

        config EXAMPLE_LCD_TOUCH_CONTROLLER_STMPE610
            bool "STMPE610"
            help
                Touch controller STMPE610 connected via SPI.

        config EXAMPLE_LCD_TOUCH_CONTROLLER_XPT2046
            bool "XPT2046"
            help
                Touch controller XPT2046 connected via SPI
    endchoice

endmenu

the above was its content.

MicroController
Posts: 1725
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: who or which utility writes Kconfig.projbuild ?

Postby MicroController » Wed Apr 17, 2024 2:11 pm

You create it yourself, if you want/need it.
If you want your project to have project-specific configuration options which you can set up via menuconfig, you can create a Kconfig.projbuild file, populate it with whatever Kconfig declarations you want, and the IDF will include these options in menuconfig and then #define CONFIG_... values accordingly during build.

Who is online

Users browsing this forum: No registered users and 275 guests