samples/sysbuild/hello_world/README.html · samples/sysbuild/hello_world/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Sysbuild

Sysbuild Multi-target Hello World

Application core와 remote radio core를 하나의 build·flash 흐름으로 묶습니다.

Official pathsamples/sysbuild/hello_world/README.html
Source filesamples/sysbuild/hello_world/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

SB_CONFIG_REMOTE_BOARD와 sample setup을 사용한 multi-core image 구성을 설명합니다.

Images

Application · Radio

Build

--sysbuild

Remote

SB_CONFIG_REMOTE_BOARD

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 62D72323F8AD866243704CE39EDC635252C52B6A2C12D379B325CD6B073BA8E2
.. zephyr:code-sample:: sysbuild_hello_world
   :name: Hello World for multiple board targets using Sysbuild

   Run a hello world sample on multiple board targets

Overview
********

The sample demonstrates how to build a Hello World application for two board
targets with :ref:`sysbuild`. This sample can be useful to test, for example,
SoCs with multiple cores as each core is exposed as a board target. Other
scenarios could include boards embedding multiple SoCs. When building with
Zephyr Sysbuild, the build system adds additional images based on the options
selected in the project's additional configuration and build files.

All images use the same :file:`main.c` that prints the board target on which the
application is programmed.

Building and Running
********************

This sample needs to be built with Sysbuild by using the ``--sysbuild`` option.
The remote board needs to be specified using ``SB_CONFIG_REMOTE_BOARD``. Some
additional settings may be required depending on the platform, for example,
to boot a remote core.

.. note::
   It is recommended to use sample setups from
   :zephyr_file:`samples/sysbuild/hello_world/sample.yaml` using the
   ``-T`` option.

Here's an example to build and flash the sample for the
:ref:`nrf54h20dk_nrf54h20`, using application and radio cores:

.. zephyr-app-commands::
   :zephyr-app: samples/sysbuild/hello_world
   :board: nrf54h20dk/nrf54h20/cpuapp
   :west-args: --sysbuild
   :gen-args: -DSB_CONFIG_REMOTE_BOARD='"nrf54h20dk/nrf54h20/cpurad"'
   :goals: build flash
   :compact:

The same can be achieved by using the
:zephyr_file:`samples/basic/multitarget_hello_world/sample.yaml` setup:

.. zephyr-app-commands::
   :zephyr-app: samples/sysbuild/hello_world
   :board: nrf54h20dk/nrf54h20/cpuapp
   :west-args: -T sample.sysbuild.hello_world.nrf54h20dk_cpuapp_cpurad
   :goals: build flash
   :compact:

After programming the sample to your board, you should observe a hello world
message in the Zephyr console configured on each target. For example, for the
sample above:

Application core

   .. code-block:: console

      *** Booting Zephyr OS build v3.6.0-274-g466084bd8c5d ***
      Hello world from nrf54h20dk/nrf54h20/cpuapp

Radio core

   .. code-block:: console

      *** Booting Zephyr OS build v3.6.0-274-g466084bd8c5d ***
      Hello world from nrf54h20dk/nrf54h20/cpurad

Part 3

한국어 전문 번역

개요

이 sample은 Sysbuild를 사용해 두 board target용 Hello World application을 build하는 방법을 보여 줍니다. 각 core가 별도 board target으로 노출되는 multi-core SoC를 시험할 때 유용하며, 여러 SoC를 내장한 board에도 같은 방식을 적용할 수 있습니다. Zephyr Sysbuild로 build하면 project의 추가 configuration과 build file에서 선택한 option에 따라 build system이 image를 더합니다.

모든 image는 application이 program된 board target 이름을 출력하는 동일한 main.c를 사용합니다.

빌드 및 실행

이 sample은 --sysbuild option으로 Sysbuild를 사용해 build해야 합니다. Remote board는 SB_CONFIG_REMOTE_BOARD로 지정합니다. Platform에 따라 remote core를 boot하기 위한 추가 설정이 필요할 수 있습니다.

-T option으로 samples/sysbuild/hello_world/sample.yaml에 정의된 sample setup을 사용하는 방식을 권장합니다.

다음은 application core와 radio core를 사용해 nrf54h20dk/nrf54h20용 sample을 build하고 flash하는 예입니다. Main target은 cpuapp, remote target은 cpurad로 지정합니다.

west build -b nrf54h20dk/nrf54h20/cpuapp --sysbuild samples/sysbuild/hello_world -- -DSB_CONFIG_REMOTE_BOARD='"nrf54h20dk/nrf54h20/cpurad"'
west flash

samples/basic/multitarget_hello_world/sample.yaml setup을 선택해도 같은 결과를 얻을 수 있습니다.

west build -b nrf54h20dk/nrf54h20/cpuapp -T sample.sysbuild.hello_world.nrf54h20dk_cpuapp_cpurad samples/sysbuild/hello_world
west flash

Board에 program한 뒤에는 각 target에 설정된 Zephyr console에서 Hello World message를 볼 수 있습니다. 앞의 예에서 application core는 다음과 같이 자신이 cpuapp target임을 출력합니다.

*** Booting Zephyr OS build v3.6.0-274-g466084bd8c5d ***
Hello world from nrf54h20dk/nrf54h20/cpuapp

Radio core도 별도 console에서 자신이 cpurad target임을 출력합니다.

*** Booting Zephyr OS build v3.6.0-274-g466084bd8c5d ***
Hello world from nrf54h20dk/nrf54h20/cpurad

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.