Skip to content
Commit 11700833 authored by Torsten Rasmussen's avatar Torsten Rasmussen Committed by Marti Bolivar
Browse files

cmake: package_helper CMake script



The Zephyr CMake package helper script allows to invoke Zephyr package
modules as they are invoked at configure time, up to the modules given
with `-DMODULES=<modules>`.
This allows to run the configure time part of the Zephyr build system
without generating a complete build system.

This means that for example devicetree module can be invoked for a given
sample and board to generate zephyr.dts identical to what is created
by the build system during a build.

To generate zephyr.dts for hello_world, invoke the script as:
$ cmake -DBOARD=<board> -B build -S samples/hello_world \
$       -DMODULES=dts -P <ZEPHYR_BASE>/cmake/package_helper.cmake

Other modules, for example 'kconfig' and 'zephyr_modules' can also be
invoked this way.

This will allow other tools, such as twister, to executed only a
subset of the build system like dts in order to do filtering before
determine if a complete build should be invoked.

Signed-off-by: default avatarTorsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
parent 31e90f1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment