introduction/index.html · introduction/index.rst 공식 원문 ↗

Zephyr 3.7.0 · Introduction

Zephyr 소개

작은 임베디드 커널이 어떤 하드웨어를 지원하고, 어떤 커널·네트워크·보안·개발 기능을 제공하는지 한눈에 정리합니다.

Official pathintroduction/index.html
Source fileintroduction/index.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

Zephyr는 자원이 제한된 시스템을 위한 모듈식 RTOS로, 여러 CPU 아키텍처와 커널 서비스, 네트워킹, Bluetooth, 파일 시스템, 로깅, shell을 선택적으로 결합합니다.

Target

Constrained · Embedded · IoT

Design

Configurable · Modular

Support

Community · Docs · Samples

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 7B85634875C90BFABD7E06323B5E605B0450BA158A3AFAC3B3190C7DDF30C8A9
.. _introducing_zephyr:

Introduction
############

The Zephyr OS is based on a small-footprint kernel designed for use on
resource-constrained and embedded systems: from simple embedded environmental
sensors and LED wearables to sophisticated embedded controllers, smart
watches, and IoT wireless applications.

The Zephyr kernel supports multiple architectures, including:

 - ARCv2 (EM and HS) and ARCv3 (HS6X)
 - ARMv6-M, ARMv7-M, and ARMv8-M (Cortex-M)
 - ARMv7-A and ARMv8-A (Cortex-A, 32- and 64-bit)
 - ARMv7-R, ARMv8-R (Cortex-R, 32- and 64-bit)
 - Intel x86 (32- and 64-bit)
 - MIPS (MIPS32 Release 1 specification)
 - NIOS II Gen 2
 - RISC-V (32- and 64-bit)
 - SPARC V8
 - Tensilica Xtensa

The full list of supported boards based on these architectures can be found :ref:`here <boards>`.

In the context of the Zephyr OS, a :term:`subsystem` refers to a logically distinct
part of the operating system that handles specific functionality or provides
certain services. Subsystems can include components such as networking,
file systems, device driver classes, power management, and communication protocols,
among others. Each subsystem is designed to be modular and can be configured,
customized, and extended to meet the requirements of different embedded
applications.

Licensing
*********

Zephyr is permissively licensed using the `Apache 2.0 license`_
(as found in the ``LICENSE`` file in the
project's `GitHub repo`_).  There are some
imported or reused components of the Zephyr project that use other licensing,
as described in :ref:`Zephyr_Licensing`.

.. _Apache 2.0 license:
   https://github.com/zephyrproject-rtos/zephyr/blob/main/LICENSE

.. _GitHub repo: https://github.com/zephyrproject-rtos/zephyr


Distinguishing Features
***********************

Zephyr offers a large and ever growing number of features including:

**Extensive suite of Kernel services**
   Zephyr offers a number of familiar services for development:

   * *Multi-threading Services* for cooperative, priority-based,
     non-preemptive, and preemptive threads with optional round robin
     time-slicing. Includes POSIX pthreads compatible API support.

   * *Interrupt Services* for compile-time registration of interrupt handlers.

   * *Memory Allocation Services* for dynamic allocation and freeing of
     fixed-size or variable-size memory blocks.

   * *Inter-thread Synchronization Services* for binary semaphores,
     counting semaphores, and mutex semaphores.

   * *Inter-thread Data Passing Services* for basic message queues, enhanced
     message queues, and byte streams.

   * *Power Management Services* such as overarching, application or
     policy-defined, System Power Management and fine-grained, driver-defined,
     Device Power Management.

**Multiple Scheduling Algorithms**
   Zephyr provides a comprehensive set of thread scheduling choices:

   * Cooperative and Preemptive Scheduling
   * Earliest Deadline First (EDF)
   * Meta IRQ scheduling implementing "interrupt bottom half" or "tasklet"
     behavior
   * Timeslicing: Enables time slicing between preemptible threads of equal
     priority
   * Multiple queuing strategies:

     * Simple linked-list ready queue
     * Red/black tree ready queue
     * Traditional multi-queue ready queue

.. _zephyr_intro_configurability:

**Highly configurable / Modular for flexibility**
   Allows an application to incorporate *only* the capabilities it needs as it
   needs them, and to specify their quantity and size.

**Cross Architecture**
   Supports a wide variety of :ref:`supported boards<boards>` with different CPU
   architectures and developer tools. Contributions have added support
   for an increasing number of SoCs, platforms, and drivers.

**Memory Protection**
   Implements configurable architecture-specific stack-overflow protection,
   kernel object and device driver permission tracking, and thread isolation
   with thread-level memory protection on x86, ARC, and ARM architectures,
   userspace, and memory domains.

   For platforms without MMU/MPU and memory constrained devices, supports
   combining application-specific code with a custom kernel to create a
   monolithic image that gets loaded and executed on a system's hardware. Both
   the application code and kernel code execute in a single shared address
   space.

**Compile-time resource definition**
   Allows system resources to be defined at compile-time, which reduces code
   size and increases performance for resource-limited systems.

**Optimized Device Driver Model**
   Provides a consistent device model for configuring the drivers that are part
   of the platform/system and a consistent model for initializing all the
   drivers configured into the system and allows the reuse of drivers across
   platforms that have common devices/IP blocks.

**Devicetree Support**
   Use of :ref:`devicetree <dt-guide>` to describe hardware.
   Information from devicetree is used to create the application image.

**Native Networking Stack supporting multiple protocols**
   Networking support is fully featured and optimized, including LwM2M and BSD
   sockets compatible support.  OpenThread support (on Nordic chipsets) is also
   provided - a mesh network designed to securely and reliably connect hundreds
   of products around the home.

**Bluetooth Low Energy 5.0 support**
   Bluetooth 5.0 compliant (ESR10) and Bluetooth Low Energy Controller support
   (LE Link Layer). Includes Bluetooth Mesh and a Bluetooth qualification-ready
   Bluetooth controller.

   * Generic Access Profile (GAP) with all possible LE roles
   * Generic Attribute Profile (GATT)
   * Pairing support, including the Secure Connections feature from Bluetooth
     4.2
   * Clean HCI driver abstraction
   * Raw HCI interface to run Zephyr as a Controller instead of a full Host
     stack
   * Verified with multiple popular controllers
   * Highly configurable

   Mesh Support:

   * Relay, Friend Node, Low-Power Node (LPN) and GATT Proxy features
   * Both Provisioning bearers supported (PB-ADV & PB-GATT)
   * Highly configurable, fitting in devices with at least 16k RAM

**Native Linux, macOS, and Windows Development**
   A command-line CMake build environment runs on popular developer OS
   systems. A native port (:ref:`native_sim <native_sim>`) lets you build and run Zephyr as a native
   application on Linux, aiding development and testing.

**Virtual File System Interface with ext2, FatFs, and LittleFS Support**
   ext2, LittleFS and FatFS support; FCB (Flash Circular Buffer) for memory constrained
   applications.

**Powerful multi-backend logging Framework**
   Support for log filtering, object dumping, panic mode, multiple backends
   (memory, networking, filesystem, console, ...) and integration with the shell
   subsystem.

**User friendly and full-featured Shell interface**
   A multi-instance shell subsystem with user-friendly features such as
   autocompletion, wildcards, coloring, metakeys (arrows, backspace, ctrl+u,
   etc.) and history. Support for static commands and dynamic sub-commands.

**Settings on non-volatile storage**
   The settings subsystem gives modules a way to store persistent per-device
   configuration and runtime state. Settings items are stored as key-value pair
   strings.

**Non-volatile storage (NVS)**
  NVS allows storage of binary blobs, strings, integers, longs, and any
  combination of these.

**Native port**
  :ref:`Native sim <native_sim>` allows running Zephyr as a Linux application with support
  for various subsystems and networking.


.. include:: ../../../../README.rst
   :start-after: start_include_here


Fundamental Terms and Concepts
******************************

See :ref:`glossary`

Part 3

한국어 전문 번역

Zephyr OS는 자원이 제한된 임베디드 시스템을 위해 설계된 작은 설치 공간의 커널을 기반으로 합니다. 단순한 내장형 환경 센서와 LED 웨어러블부터 정교한 임베디드 컨트롤러, 스마트워치, IoT 무선 애플리케이션까지 폭넓게 사용할 수 있습니다.

Zephyr 커널은 다음을 포함한 여러 아키텍처를 지원합니다.

  • ARCv2(EM 및 HS)와 ARCv3(HS6X)
  • ARMv6-M, ARMv7-M, ARMv8-M(Cortex-M)
  • ARMv7-A, ARMv8-A(Cortex-A, 32비트 및 64비트)
  • ARMv7-R, ARMv8-R(Cortex-R, 32비트 및 64비트)
  • Intel x86(32비트 및 64비트)
  • MIPS(MIPS32 Release 1 명세)
  • NIOS II Gen 2
  • RISC-V(32비트 및 64비트)
  • SPARC V8
  • Tensilica Xtensa

이 아키텍처를 기반으로 지원되는 보드의 전체 목록은 지원 보드 문서에서 확인할 수 있습니다.

Zephyr OS에서 subsystem은 특정 기능을 처리하거나 특정 서비스를 제공하는, 운영체제의 논리적으로 구분된 부분을 뜻합니다. 네트워킹, 파일 시스템, 장치 드라이버 클래스, 전원 관리, 통신 프로토콜 등이 subsystem에 포함될 수 있습니다. 각 subsystem은 모듈식으로 설계되며, 다양한 임베디드 애플리케이션의 요구 사항에 맞게 구성하고 사용자화하며 확장할 수 있습니다.

라이선스

Zephyr는 프로젝트 GitHub 저장소의 LICENSE 파일에 있는 Apache 2.0 라이선스를 사용해 관대한 조건으로 배포됩니다. 다만 가져오거나 재사용한 일부 구성요소에는 다른 라이선스가 적용되며, 이는 Zephyr Project 구성요소 라이선스 문서에 설명되어 있습니다.

차별화된 기능

Zephyr는 다음을 포함해 매우 많은 기능을 제공하며 그 범위가 계속 커지고 있습니다.

폭넓은 커널 서비스 모음

Zephyr는 개발에 익숙하게 사용할 수 있는 여러 서비스를 제공합니다.

  • 다중 스레딩 서비스: 협력형, 우선순위 기반 비선점형, 선점형 스레드와 선택적인 라운드 로빈 시간 분할을 지원합니다. POSIX pthread 호환 API도 포함합니다.
  • 인터럽트 서비스: 빌드 시점에 인터럽트 처리기를 등록합니다.
  • 메모리 할당 서비스: 고정 크기 또는 가변 크기 메모리 블록을 동적으로 할당하고 해제합니다.
  • 스레드 간 동기화 서비스: 이진 세마포어, 계수 세마포어, 뮤텍스 세마포어를 제공합니다.
  • 스레드 간 데이터 전달 서비스: 기본 메시지 큐, 향상된 메시지 큐, 바이트 스트림을 제공합니다.
  • 전원 관리 서비스: 애플리케이션 또는 정책이 정의하는 시스템 전원 관리와 드라이버가 정의하는 세밀한 장치 전원 관리를 제공합니다.

여러 스케줄링 알고리즘

Zephyr는 다음과 같은 포괄적인 스레드 스케줄링 선택지를 제공합니다.

  • 협력형 및 선점형 스케줄링
  • Earliest Deadline First(EDF)
  • 인터럽트 bottom half 또는 tasklet 동작을 구현하는 Meta IRQ 스케줄링
  • 시간 분할: 우선순위가 같은 선점 가능 스레드 사이에서 실행 시간을 나눕니다.
  • 단순 연결 목록 ready queue, red/black tree ready queue, 전통적인 multi-queue ready queue를 포함한 여러 큐 전략

높은 구성 가능성과 유연한 모듈성

애플리케이션은 필요한 기능만 필요한 시점에 포함하고, 각 기능의 수량과 크기를 지정할 수 있습니다.

교차 아키텍처

서로 다른 CPU 아키텍처와 개발 도구를 사용하는 다양한 보드를 지원합니다. 기여가 계속 추가되면서 지원하는 SoC, 플랫폼, 드라이버 수도 늘고 있습니다.

메모리 보호

x86, ARC, ARM 아키텍처에서 구성 가능한 아키텍처별 스택 오버플로 보호, 커널 객체와 장치 드라이버 권한 추적, 사용자 공간 및 메모리 도메인을 이용한 스레드 수준 메모리 보호와 격리를 구현합니다.

MMU나 MPU가 없고 메모리가 제한된 플랫폼에서는 애플리케이션별 코드와 맞춤형 커널을 결합해 하드웨어에 적재·실행되는 단일 이미지를 만들 수 있습니다. 이때 애플리케이션 코드와 커널 코드는 하나의 공유 주소 공간에서 실행됩니다.

빌드 시점 자원 정의

시스템 자원을 빌드 시점에 정의할 수 있어, 자원이 제한된 시스템에서 코드 크기를 줄이고 성능을 높입니다.

최적화된 장치 드라이버 모델

플랫폼 또는 시스템에 포함할 드라이버를 구성하는 일관된 모델과, 시스템 이미지에 구성된 모든 드라이버를 초기화하는 일관된 모델을 제공합니다. 공통 장치 또는 IP 블록이 있는 플랫폼은 드라이버를 재사용할 수 있습니다.

Devicetree 지원

하드웨어를 기술하는 데 Devicetree를 사용합니다. Devicetree 정보는 애플리케이션 이미지를 만드는 데 사용됩니다.

여러 프로토콜을 지원하는 네이티브 네트워킹 스택

네트워킹 기능은 완전한 기능을 갖추면서 최적화되어 있으며 LwM2M과 BSD socket 호환 지원을 포함합니다. Nordic 칩셋에서는 집 안의 수백 개 제품을 안전하고 신뢰성 있게 연결하도록 설계된 mesh network인 OpenThread도 지원합니다.

Bluetooth Low Energy 5.0 지원

Bluetooth 5.0 준수(ESR10)와 Bluetooth Low Energy Controller(LE Link Layer)를 지원합니다. Bluetooth Mesh와 Bluetooth qualification 준비가 된 controller도 포함합니다.

  • 가능한 모든 LE role을 갖춘 Generic Access Profile(GAP)
  • Generic Attribute Profile(GATT)
  • Bluetooth 4.2의 Secure Connections 기능을 포함한 pairing 지원
  • 깔끔한 HCI 드라이버 추상화
  • Zephyr를 전체 Host stack 대신 Controller로 실행하기 위한 raw HCI interface
  • 여러 대중적인 controller를 이용한 검증
  • 높은 구성 가능성

Mesh 지원 내용은 다음과 같습니다.

  • Relay, Friend Node, Low-Power Node(LPN), GATT Proxy 기능
  • 두 provisioning bearer(PB-ADV 및 PB-GATT) 모두 지원
  • 구성이 매우 유연하며 최소 16KB RAM을 갖춘 장치에도 적용 가능

Linux, macOS, Windows 네이티브 개발

명령줄 CMake 빌드 환경은 널리 쓰이는 개발 운영체제에서 실행됩니다. native_sim 포트를 사용하면 Zephyr를 Linux 네이티브 애플리케이션으로 빌드·실행할 수 있어 개발과 테스트에 도움이 됩니다.

ext2, FatFs, LittleFS를 지원하는 가상 파일 시스템 인터페이스

ext2, LittleFS, FatFS를 지원하고, 메모리가 제한된 애플리케이션을 위한 FCB(Flash Circular Buffer)를 제공합니다.

강력한 다중 backend 로깅 프레임워크

로그 필터링, 객체 덤프, panic mode, 메모리·네트워크·파일 시스템·console 등을 포함한 여러 backend, shell subsystem 연동을 지원합니다.

사용하기 편하고 기능이 풍부한 Shell 인터페이스

자동 완성, wildcard, 색상, 방향키·backspace·Ctrl+U 등의 meta key, history를 갖춘 다중 instance shell subsystem입니다. 정적 명령과 동적 하위 명령을 모두 지원합니다.

비휘발성 저장소의 Settings

Settings subsystem은 module이 장치별 영구 구성과 runtime 상태를 저장할 수 있게 합니다. Settings 항목은 key-value pair 문자열로 저장됩니다.

비휘발성 저장소(NVS)

NVS는 binary blob, 문자열, 정수, long 값과 이들의 임의 조합을 저장할 수 있습니다.

네이티브 포트

native_sim을 사용하면 여러 subsystem과 networking을 지원하는 Linux 애플리케이션으로 Zephyr를 실행할 수 있습니다.

커뮤니티 지원

커뮤니티 지원은 mailing list와 Discord를 통해 제공됩니다. 자세한 경로는 아래 리소스를 참고하십시오.

리소스

필요한 정보를 빠르게 찾을 수 있도록 주요 리소스를 정리하면 다음과 같습니다.

시작하기

코드와 개발

커뮤니티와 지원

문제 추적과 보안

추가 리소스

기본 용어와 개념

용어집을 참고하십시오.

Source

출처

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