Skip to content

Commit 2b93705

Browse files
nordicjmcarlescufi
authored andcommitted
doc: sysbuild: Improve documentation for targets
Adds information on targets that can be used from sysbuild. Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent 9a5e9e4 commit 2b93705

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

doc/build/sysbuild/index.rst

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ The following are some key sysbuild features indicated in this figure:
7474
are packaged into a global view of how to flash and debug each build system
7575
in a :file:`domains.yaml` file generated and managed by sysbuild.
7676

77+
- Build names are prefixed with the target name and an underscore, for example
78+
the sysbuild target is prefixed with ``sysbuild_`` and if MCUboot is enabled
79+
as part of sysbuild, it will be prefixed with ``mcuboot_``. This also allows
80+
for running things like menuconfig with the prefix, for example (if using
81+
ninja) ``ninja sysbuild_menuconfig`` to configure sysbuild or (if using make)
82+
``make mcuboot_menuconfig``.
83+
7784
Building with sysbuild
7885
**********************
7986

@@ -386,6 +393,70 @@ specify this file when building with sysbuild, as follows:
386393
:gen-args: -DAPP_DIR=samples/hello_world -DSB_CONF_FILE=sysbuild-mcuboot.conf
387394
:compact:
388395

396+
Sysbuild targets
397+
****************
398+
399+
Sysbuild creates build targets for each image (including sysbuild itself) for
400+
the following modes:
401+
402+
* menuconfig
403+
* hardenconfig
404+
* guiconfig
405+
406+
For the main application (as is the same without using sysbuild) these can be
407+
ran normally without any prefix. For other images (including sysbuild), these
408+
are ran with a prefix of the image name and an underscore e.g. ``sysbuild_`` or
409+
``mcuboot_``, using ninja or make - for details on how to run image build
410+
targets that do not have mapped build targets in sysbuild, see the
411+
:ref:`sysbuild_dedicated_image_build_targets` section.
412+
413+
.. _sysbuild_dedicated_image_build_targets:
414+
415+
Dedicated image build targets
416+
*****************************
417+
418+
Not all build targets for images are given equivalent prefixed build targets
419+
when sysbuild is used, for example build targets like ``ram_report``,
420+
``rom_report``, ``footprint``, ``puncover`` and ``pahole`` are not exposed.
421+
When using :ref:`Trusted Firmware <tfm_build_system>`, this includes build
422+
targets prefix with ``tfm_`` and ``bl2_``, for example: ``tfm_rom_report``
423+
and ``bl2_ram_report``. To run these build targets, the build directory of the
424+
image can be provided to west/ninja/make along with the name of the build
425+
target to execute and it will run.
426+
427+
.. tabs::
428+
429+
.. group-tab:: ``west``
430+
431+
Assuming that a project has been configured and built using ``west``
432+
using sysbuild with mcuboot enabled in the default ``build`` folder
433+
location, the ``rom_report`` build target for ``mcuboot`` can be ran
434+
with:
435+
436+
.. code-block:: bash
437+
438+
west build -d build/mcuboot -t rom_report
439+
440+
.. group-tab:: ``ninja``
441+
442+
Assuming that a project has been configured using ``cmake`` and built
443+
using ``ninja`` using sysbuild with mcuboot enabled, the ``rom_report``
444+
build target for ``mcuboot`` can be ran with:
445+
446+
.. code-block:: bash
447+
448+
ninja -C mcuboot rom_report
449+
450+
.. group-tab:: ``make``
451+
452+
Assuming that a project has been configured using ``cmake`` and built
453+
using ``make`` using sysbuild with mcuboot enabled, the ``rom_report``
454+
build target for ``mcuboot`` can be ran with:
455+
456+
.. code-block:: bash
457+
458+
make -C mcuboot rom_report
459+
389460
.. _sysbuild_zephyr_application:
390461

391462
Adding Zephyr applications to sysbuild

0 commit comments

Comments
 (0)