Lines Matching +full:multi +full:- +full:image
6 Sysbuild is a higher-level build system that can be used to combine multiple
7 other build systems together. It is a higher-level layer that combines one
27 Single-image build
31 Multi-image build
33 …The word "image" is used because your main goal is usually to generate the binaries of the firmware
39 Multi-domain
50 :figclass: align-center
55 - You can run sysbuild either with :ref:`west build
56 <west-building>` or directly via ``cmake``.
58 - You can use sysbuild to generate application images from each build system,
61 - You can configure sysbuild or any of the build systems it manages using
66 - Sysbuild itself is also configured using Kconfig. For example, you can
68 link your main Zephyr application as an MCUboot-bootable image, using sysbuild's
71 - Sysbuild integrates with west's :ref:`west-build-flash-debug` commands. It
72 does this by managing the :ref:`west-runner`, and specifically the
77 - Build names are prefixed with the target name and an underscore, for example
91 .. group-tab:: ``west build``
93 Here is an example. For details, see :ref:`west-multi-domain-builds` in
96 .. zephyr-app-commands::
98 :zephyr-app: samples/hello_world
101 :west-args: --sysbuild
106 To configure ``west build`` to use ``--sysbuild`` by default from now on,
109 .. code-block:: shell
113 Since sysbuild supports both single- and multi-image builds, this lets you
119 .. code-block:: shell
125 .. code-block:: shell
127 west build --no-sysbuild ...
129 .. group-tab:: ``cmake``
133 .. zephyr-app-commands::
138 :gen-args: -DAPP_DIR=samples/hello_world
142 project as the source folder, and give ``-DAPP_DIR=<path-to-sample>`` as
151 ``-D<var>=<value>`` or ``-DCONFIG_<var>=<value>`` are handled by the Zephyr
160 The following example shows how to build :zephyr:code-sample:`hello_world` with MCUboot enabled,
165 .. group-tab:: ``west build``
167 .. zephyr-app-commands::
169 :zephyr-app: samples/hello_world
172 :west-args: --sysbuild
173 …:gen-args: -DSB_CONFIG_BOOTLOADER_MCUBOOT=y -DCONFIG_DEBUG_OPTIMIZATIONS=y -Dmcuboot_CONFIG_DEBUG_…
176 .. group-tab:: ``cmake``
178 .. zephyr-app-commands::
183 …:gen-args: -DAPP_DIR=samples/hello_world -DSB_CONFIG_BOOTLOADER_MCUBOOT=y -DCONFIG_DEBUG_OPTIMIZAT…
193 CMake variable settings can be passed to CMake using ``-D<var>=<value>`` on the
195 ``-DCONFIG_<var>=<value>`` or ``-D<namespace>_CONFIG_<var>=<value>``.
206 -D<namespace>_<var>=<value>
213 .. group-tab:: ``west build``
215 .. code-block:: shell
217 west build --sysbuild ... -- -Dmy_sample_FOO=BAR
219 .. group-tab:: ``cmake``
221 .. code-block:: shell
223 cmake -Dmy_sample_FOO=BAR ...
232 -DSB_CONFIG_<var>=<value>
239 -D<namespace>_CONFIG_<var>=<value>
249 .. group-tab:: ``west build``
251 .. code-block:: shell
253 west build --sysbuild ... -- -Dmy_sample_CONFIG_FOO=BAR
255 .. group-tab:: ``cmake``
257 .. code-block:: shell
259 cmake -Dmy_sample_CONFIG_FOO=BAR ...
265 This means that passing ``-DCONFIG_<var>=<value>`` and
266 ``-Dmy_sample_CONFIG_<var>=<value>`` are equivalent.
272 .. code-block:: shell
274 west build -b <board> my_sample -- -DCONFIG_FOO=BAR
276 .. code-block:: shell
278 west build -b <board> --sysbuild my_sample -- -DCONFIG_FOO=BAR
283 You can use :ref:`west flash <west-flashing>` to flash applications with
287 image is flashed in sequence. Extra arguments such as ``--runner jlink`` are
290 For more details, see :ref:`west-multi-domain-flashing`.
296 Just follow the existing :ref:`west debug <west-debugging>` guide to debug the main sample.
299 the ``--domain`` argument, as follows::
301 west debug --domain mcuboot
303 For more details, see :ref:`west-multi-domain-debugging`.
315 .. group-tab:: ``west build``
317 .. zephyr-app-commands::
319 :zephyr-app: samples/hello_world
322 :west-args: --sysbuild
323 :gen-args: -DSB_CONFIG_BOOTLOADER_MCUBOOT=y
326 .. group-tab:: ``cmake``
328 .. zephyr-app-commands::
333 :gen-args: -DAPP_DIR=samples/hello_world -DSB_CONFIG_BOOTLOADER_MCUBOOT=y
347 flashing only MCUBoot, for example using ``west flash --domain mcuboot``, may
348 erase the entire flash, including the main application image.
355 ``sysbuild.conf`` in the application top-level directory.
360 .. code-block:: none
368 .. code-block:: cfg
373 ``-DSB_CONF_FILE=<sysbuild-conf-file>`` CMake build setting.
375 For example, you can create ``sysbuild-mcuboot.conf`` and then
380 .. group-tab:: ``west build``
382 .. zephyr-app-commands::
384 :zephyr-app: samples/hello_world
387 :west-args: --sysbuild
388 :gen-args: -DSB_CONF_FILE=sysbuild-mcuboot.conf
391 .. group-tab:: ``cmake``
393 .. zephyr-app-commands::
398 :gen-args: -DAPP_DIR=samples/hello_world -DSB_CONF_FILE=sysbuild-mcuboot.conf
404 Sysbuild creates build targets for each image (including sysbuild itself) for
413 are ran with a prefix of the image name and an underscore e.g. ``sysbuild_`` or
414 ``mcuboot_``, using ninja or make - for details on how to run image build
420 Dedicated image build targets
429 image can be provided to west/ninja/make along with the name of the build
434 .. group-tab:: ``west``
441 .. code-block:: shell
443 west build -d build/mcuboot -t rom_report
445 .. group-tab:: ``ninja``
451 .. code-block:: shell
453 ninja -C mcuboot rom_report
455 .. group-tab:: ``make``
461 .. code-block:: shell
463 make -C mcuboot rom_report
479 as the main image, use this example:
481 .. code-block:: cmake
485 SOURCE_DIR <path-to>/my_sample
489 SoC-specific bootloader along with your main application.
497 * A specific core on a physical board with a multi-core SoC, such as
506 .. code-block:: cmake
510 SOURCE_DIR <path-to>/my_sample
524 If the extra application image is specific to the board or an application,
529 .. code-block:: none
539 .. code-block:: cmake
544 SOURCE_DIR <path-to>/second_sample
550 .. code-block:: kconfig
567 You can mark ``my_sample`` as a build-only application in this manner:
569 .. code-block:: cmake
573 SOURCE_DIR <path-to>/my_sample
578 but it will be excluded from the default image sequence used by ``west flash``.
579 Instead, you may use the outputs of this domain for other purposes - for example,
580 to produce a secondary image for DFU, or to merge multiple images together.
583 a Kconfig option, which would make ``my_sample`` conditionally build-only.
587 Applications marked as build-only can still be flashed manually, using
588 ``west flash --domain my_sample``. As such, the ``BUILD_ONLY`` option only
604 Sysbuild also allows users to change :ref:`application-configuration-directory`
605 in order to give users full control of an image's configuration.
608 ----------------------------------------------------------
612 :file:`<image>.conf` or :file:`<image>.overlay`, for example if your main
618 .. code-block:: cfg
624 ------------------------------------------
627 :file:`sysbuild/<image>/`.
629 ``<image>``.
634 .. code-block:: none
659 ----------------------------
662 (see :ref:`application-file-suffixes` for details on this feature in applications). For sysbuild,
663 a globally provided option will be passed down to all images. In addition, the image configuration
668 .. code-block:: none
699 image name:
703 .. group-tab:: ``west build``
705 .. zephyr-app-commands::
710 :west-args: --sysbuild
711 :gen-args: -DSB_CONFIG_BOOTLOADER_MCUBOOT=y -Dmcuboot_FILE_SUFFIX="max_log"
714 .. group-tab:: ``cmake``
716 .. zephyr-app-commands::
721 … :gen-args: -DAPP_DIR=<app_dir> -DSB_CONFIG_BOOTLOADER_MCUBOOT=y -Dmcuboot_FILE_SUFFIX="max_log"
729 Sometimes, in a multi-image build, you may want certain Zephyr applications to
745 .. code-block:: cmake
747 sysbuild_add_dependencies(IMAGE CONFIGURE my_sample sample_a sample_b)
755 .. code-block:: cmake
757 sysbuild_add_dependencies(IMAGE FLASH my_sample sample_a sample_b)
764 Adding flashing dependencies is not allowed for build-only applications.
768 Adding non-Zephyr applications to sysbuild
771 You can include non-Zephyr applications in a multi-image build using the
775 When using ``ExternalProject``, the non-Zephyr application will be built as
780 .. _MCUboot with Zephyr: https://docs.mcuboot.com/readme-zephyr
791 :ref:`modules <module-yml>` do, this will cause the files to be included in
792 each image that is part of a project. Alternatively, there are
793 :ref:`sysbuild-specific module extension <sysbuild_module_integration>` files
795 image itself, this is where e.g. a custom image for a particular board or SoC