Kconfig
- menuconfig is a old system used by linux for configuration
- on running idf.py menuconfig, you see a menu, all the entries in it are generated by file Kconfig.
-
Kconfig defines the entries of the menu
- Kconfig starts and ends with
menu
andendmenu
it is must to see the it in menu ``` menu
endmenu
three data types only:
* int
* string
* bool
we use `config` to configure a value
config MESSAGE_QUEUE_SIZE int “Queue Size” default 1000 help “Sets message queue size” ```
- So, all the values set by menuconfig are stored in a header file called sdkconfig.h, options are stored in sdkconfig file.
- So, if my config option is
MESSAGE_QUEUE_SIZE
, we can use this value by using macro namedCONFIG_MESSAGE_QUEUE_SIZE
- All the config values are stored in form of a macro, and can be accessed by prefixing
CONFIG_
with the name of the config value.