summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-09-20 13:33:59 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-09-23 17:31:20 +0200
commit6156041560c75831e003202b790ab3f435bbb388 (patch)
tree8bb3de3561d87e4faeb73dfef098d8e3726db363 /README.rst
parent3df532b8d4cdf6915eaf079ee8082f792ab9b0cb (diff)
Add support for user-defined Python preprocessor functions
Allow preprocessor functions to be defined in Python by putting a module called 'kconfigfunctions' into sys.path. Internally, this simply adds the functions to the predefined functions in Kconfig._functions. User-defined Python functions make it simple to integrate information from existing Python tools into Kconfig, e.g. to have Kconfig symbols depend on hardware information stored in some other format. This might be used to get device tree information into Kconfig in Zephyr. Piggyback module docstring documentation for some extensions that were previously only mentioned in the README.
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 4600304..a2f66c9 100644
--- a/README.rst
+++ b/README.rst
@@ -207,6 +207,15 @@ The following Kconfig extensions are available:
are specified relative to the directory of the current Kconfig file. An
``orsource`` statement is available as well, analogous to ``osource``.
+- Preprocessor user functions can be defined in Python, which makes it simple
+ to integrate information from existing Python tools into Kconfig (e.g. to
+ have Kconfig symbols depend on hardware information stored in some other
+ format).
+
+ See the *Kconfig extensions* section in the
+ `kconfiglib.py <https://github.com/ulfalizer/Kconfiglib/blob/master/kconfiglib.py>`_
+ module docstring for more information.
+
- ``def_int``, ``def_hex``, and ``def_string`` are available in addition to
``def_bool`` and ``def_tristate``, allowing ``int``, ``hex``, and ``string``
symbols to be given a type and a default at the same time.