래울 2024. 11. 20. 00:46

 Zephyr

https://zephyrproject.org/

 

Zephyr Project – A proven RTOS ecosystem, by developers, for developers

The Zephyr RTOS is trusted by commercial products in market today.

zephyrproject.org

 

Zephyr OS 란?

임베디드 기기 같은 장치를 구동하기 위해 고안된 실시간 운영체제 RTOS의 일종

 

The Zephyr OS is based on a “small-footprint” kernel designed for use on resource-constrained and embedded systems
즉, 제퍼는 임베디드 시스템을 고려한 적은 메모리를 지향하는 커널 디자인을 기초한다.

 

Zephyr OS가 지원하는 시스템 아키텍처

- ARCv2 (EM and HS), ARCv3 (HS6X)

- ARMv6-M, ARMv7-M, ARMv8-M (Cortex-M)

- ARMv7-A, ARMv8-A (Cortex-A, (32bit or 64bit))

- ARMv7-R, ARMv8-R (Cortex-R, (32bit or 64bit))

- Intelx86 (32bit or 64bit)

- MIPS (MIPS32 Release 1 specification)

- NIOS II Gen 2

- RISC-V (32bit or 64bit)

- SPARC V8

- Tensilica Xtensa

 


Building an application

https://docs.zephyrproject.org/latest/develop/application/index.html#build-an-application

 

Application Development — Zephyr Project Documentation

The Zephyr build system compiles and links all components of an application into a single application image that can be run on simulated hardware or real hardware. Like any other CMake-based system, the build process takes place in two stages. First, build

docs.zephyrproject.org

 

 

Zephyr 빌드 시스템은 애플리케이션의 모든 구성 요소를 시뮬레이션된 하드웨어나 실제 하드웨어에서 실행할 수 있는 애플리케이션 이미지로 컴파일 해줌

 

빌드 프로세스는 두 단계로 진행됨

1.  빌드 시스템 생성

- cmake 명령어를 사용해 빌드 파일을 생성

- 여기서 Generator는 빌드에 사용할 기본 도구를 결정함

2. 애플리케이션 빌드

- 기본 빌드 도구(ex: ninja, make)를 사용해 실제 소스 파일을 컴파일하고 이미지를 생성함

- Zephyr의 기본 빌드 도구는 west임

 

CMake와 ninja를 사용하는 방법

# From the root of the zephyr repository
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild -GNinja -DBOARD=reel_board samples/hello_world

# Now run the build tool on the generated build system:
ninja -Cbuild

 

CMak를 직접 사용하는 경우

# From the root of the zephyr repository
# Use cmake to configure a Make-based buildsystem:
cmake -Bbuild -DBOARD=reel_board samples/hello_world

# Now run the build tool on the generated build system:
make -Cbuild