1.. zephyr:code-sample:: sysbuild_hello_world 2 :name: Hello World for multiple board targets using Sysbuild 3 4 Run a hello world sample on multiple board targets 5 6Overview 7******** 8 9The sample demonstrates how to build a Hello World application for two board 10targets with :ref:`sysbuild`. This sample can be useful to test, for example, 11SoCs with multiple cores as each core is exposed as a board target. Other 12scenarios could include boards embedding multiple SoCs. When building with 13Zephyr Sysbuild, the build system adds additional images based on the options 14selected in the project's additional configuration and build files. 15 16All images use the same :file:`main.c` that prints the board target on which the 17application is programmed. 18 19Building and Running 20******************** 21 22This sample needs to be built with Sysbuild by using the ``--sysbuild`` option. 23The remote board needs to be specified using ``SB_CONFIG_REMOTE_BOARD``. Some 24additional settings may be required depending on the platform, for example, 25to boot a remote core. 26 27.. note:: 28 It is recommended to use sample setups from 29 :zephyr_file:`samples/sysbuild/hello_world/sample.yaml` using the 30 ``-T`` option. 31 32Here's an example to build and flash the sample for the 33:ref:`nrf54h20dk_nrf54h20`, using application and radio cores: 34 35.. zephyr-app-commands:: 36 :zephyr-app: samples/sysbuild/hello_world 37 :board: nrf54h20dk/nrf54h20/cpuapp 38 :west-args: --sysbuild 39 :gen-args: -DSB_CONFIG_REMOTE_BOARD='"nrf54h20dk/nrf54h20/cpurad"' 40 :goals: build flash 41 :compact: 42 43The same can be achieved by using the 44:zephyr_file:`samples/sysbuild/hello_world/sample.yaml` setup: 45 46.. zephyr-app-commands:: 47 :zephyr-app: samples/sysbuild/hello_world 48 :board: nrf54h20dk/nrf54h20/cpuapp 49 :west-args: -T sample.sysbuild.hello_world.nrf54h20dk_cpuapp_cpurad 50 :goals: build flash 51 :compact: 52 53After programming the sample to your board, you should observe a hello world 54message in the Zephyr console configured on each target. For example, for the 55sample above: 56 57Application core 58 59 .. code-block:: console 60 61 *** Booting Zephyr OS build v3.6.0-274-g466084bd8c5d *** 62 Hello world from nrf54h20dk/nrf54h20/cpuapp 63 64Radio core 65 66 .. code-block:: console 67 68 *** Booting Zephyr OS build v3.6.0-274-g466084bd8c5d *** 69 Hello world from nrf54h20dk/nrf54h20/cpurad 70