Skip to content

Commit

Permalink
doc: modules: Document conventions for auto-generated Kconfig options
Browse files Browse the repository at this point in the history
Document the recommended practice regarding having default definitions for
module-specific Kconfig symbols.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
  • Loading branch information
jhedberg authored and aescolar committed Sep 16, 2024
1 parent bdcd54e commit d33dbdb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/develop/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,14 @@ Zephyr modules
In both Kconfig and CMake, the variable ``ZEPHYR_<MODULE_NAME>_MODULE_DIR``
contains the absolute path to the module.

Additionally, ``ZEPHYR_<MODULE_NAME>_MODULE`` and ``ZEPHYR_<MODULE_NAME>_MODULE_BLOBS``
(in case the module declares blobs) symbols are automatically generated for available
modules. These can be used e.g. to declare dependencies from other Kconfig symbols
which depend on the module or blobs from the module. To satisfy compliance checking
when building Zephyr without the module present, it's recommended for the module to
have default definitions for these symbols in its respective Kconfig file under
``modules/`` in the Zephyr main tree.

In CMake, ``ZEPHYR_<MODULE_NAME>_CMAKE_DIR`` contains the
absolute path to the directory containing the :file:`CMakeLists.txt` file that
is included into CMake build system. This variable's value is empty if the
Expand Down

0 comments on commit d33dbdb

Please sign in to comment.