From d821655def365f85c805b4b1c375484bab64ed70 Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Mon, 7 Aug 2023 12:41:51 +0200 Subject: [PATCH] doc: sysbuild: Document the BUILD_ONLY parameter Add a brief subsection about how to build a Zephyr application without flashing it. Signed-off-by: Grzegorz Swiderski --- doc/build/sysbuild/index.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/build/sysbuild/index.rst b/doc/build/sysbuild/index.rst index 7ff75cd7d482c9..47dbc07d8743e2 100644 --- a/doc/build/sysbuild/index.rst +++ b/doc/build/sysbuild/index.rst @@ -556,6 +556,27 @@ disable it using the Kconfig option ``SECOND_SAMPLE``. For more information on setting sysbuild Kconfig options, see :ref:`sysbuild_kconfig_namespacing`. +Building without flashing +========================= + +You can mark ``my_sample`` as a build-only application in this manner: + +.. code-block:: cmake + + ExternalZephyrProject_Add( + APPLICATION my_sample + SOURCE_DIR /my_sample + BUILD_ONLY TRUE + ) + +As a result, ``my_sample`` will be built as part of the sysbuild build invocation, +but neither ``west flash`` nor ``west debug`` will be aware of this application. +Instead, you may use the outputs of this domain for other purposes - for example, +to produce a secondary image for DFU, or to merge multiple images together. + +You can also replace ``TRUE`` with another boolean constant in CMake, such as +a Kconfig option, which would make ``my_sample`` conditionally build-only. + Zephyr application configuration ================================