doc: add commas in macro arguments to Kconfig tips

Kconfig uses commas to separate macro arguments.

Improve Kconfig documentation by describing to users how this can be
handled when using devicetree Kconfig macros when using devicetree names
which may have commas in them.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2022-10-31 14:49:10 +01:00 committed by Marti Bolivar
parent 6be9666ba2
commit c8942afe6d
1 changed files with 24 additions and 0 deletions

View File

@ -593,6 +593,30 @@ invisible:
[*] All my children are invisible ----
Commas in macro arguments
*************************
Kconfig uses commas to separate macro arguments.
This means a construct like this will fail:
.. code-block:: none
config FOO
bool
default y if $(dt_chosen_enabled,"zephyr,bar")
To solve this problem, create a variable with the text and use this variable as
argument, as follows:
.. code-block:: none
DT_CHOSEN_ZEPHYR_BAR := zephyr,bar
config FOO
bool
default y if $(dt_chosen_enabled,$(DT_CHOSEN_ZEPHYR_BAR))
Checking changes in menuconfig/guiconfig
****************************************