develop/toolchains/crosstool_ng.html · develop/toolchains/crosstool_ng.rst 공식 원문 ↗

Zephyr 3.7.0 · Develop · Toolchains · Crosstool-NG

Crosstool-NG (폐기 예정)

Crosstool-NG toolchain을 build하고 기존 xtools 설정을 cross-compile variant로 이식합니다.

Official pathdevelop/toolchains/crosstool_ng.html
Source filedevelop/toolchains/crosstool_ng.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

Crosstool-NG host 준비와 sdk-ng build, xtools 환경 변수 확인, 검증 architecture 범위와 폐기 예정 상태를 설명합니다.

Status

deprecated

Build

sdk-ng · go.sh

Path

XTOOLS_TOOLCHAIN_PATH

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 BCE6B65AAB683439C8097B005F59547A48715D5408BFE0AE43CA5DD31E7DBF19
.. _toolchain_xtools:

Crosstool-NG (Deprecated)
#########################

.. warning::

   ``xtools`` toolchain variant is deprecated. The
   :ref:`cross-compile toolchain variant <other_x_compilers>` should be used
   when using a custom toolchain built with Crosstool-NG.

You can build toolchains from source code using crosstool-NG.

#. Follow the steps on the crosstool-NG website to `prepare your host
   <http://crosstool-ng.github.io/docs/os-setup/>`_.

#. Follow the `Zephyr SDK with Crosstool NG instructions
   <https://github.com/zephyrproject-rtos/sdk-ng/blob/master/README.md>`_ to
   build your toolchain. Repeat as necessary to build toolchains for multiple
   target architectures.

   You will need to clone the ``sdk-ng`` repo and run the following command:

   .. code-block:: console

      ./go.sh <arch>

   .. note::

      Currently, only i586 and Arm toolchain builds are verified.

#. :ref:`Set these environment variables <env_vars>`:

   - Set :envvar:`ZEPHYR_TOOLCHAIN_VARIANT` to ``xtools``.
   - Set :envvar:`XTOOLS_TOOLCHAIN_PATH` to the toolchain build directory.

#. To check that you have set these variables correctly in your current
   environment, follow these example shell sessions (the
   :envvar:`XTOOLS_TOOLCHAIN_PATH` values may be different on your system):

   .. code-block:: console

      # Linux, macOS:
      $ echo $ZEPHYR_TOOLCHAIN_VARIANT
      xtools
      $ echo $XTOOLS_TOOLCHAIN_PATH
      /Volumes/CrossToolNGNew/build/output/

.. _crosstool-ng site: http://crosstool-ng.org

Part 3

한국어 전문 번역

Crosstool-NG 설정

Crosstool-NG를 사용하면 source code에서 cross toolchain을 build할 수 있습니다.

  1. Crosstool-NG host 준비 절차에 따라 build host를 준비합니다.
  2. Zephyr SDK Crosstool-NG 안내에 따라 sdk-ng repository를 clone하고 대상 architecture마다 build를 반복합니다.
  3. 환경 변수 설정 안내에 따라 ZEPHYR_TOOLCHAIN_VARIANT=xtools과 XTOOLS_TOOLCHAIN_PATH를 toolchain build directory로 설정합니다.

Toolchain build 명령은 다음과 같으며 <arch>를 대상 architecture 이름으로 바꿉니다.

./go.sh <arch>

현재 shell에서 환경 변수를 확인하는 예:

# Linux, macOS:
$ echo $ZEPHYR_TOOLCHAIN_VARIANT
xtools
$ echo $XTOOLS_TOOLCHAIN_PATH
/Volumes/CrossToolNGNew/build/output/

Source

출처

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