Zephyr简介:第二节

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

It is designed to be supported by multiple architectures, including ARM Cortex-M, Intel x86, and ARC. The full list of supported boards can be found here.

Zephyr内核是一个用于资源受限系统的小型内核,适用于简单嵌入式环境传感器和LED穿戴设备到智能手表和IoTa无线网关等多个领域。

该内核能够支持多种架构,包括ARM Cortex-M、Intel x86以及ARC等。

Licensing

The Zephyr project associated with the kernel makes it available to users and developers under the Apache License, version 2.0.

Zephyr项目以及内核遵从Apache许可V2.0

Distinguishing Features优势特点

The Zephyr kernel offers a number of features that distinguish it from other small-footprint OSes:

Zephyr内核提供多种区别于其他小型OS的特点:

  1. Single address-space OS. Combines 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.第一,单地址空间OS。将APP代码与定制内核代码融合在一起生成一个可以加载和运行于硬件系统的镜像文件。APP代码和内核代码运行于单个共享地址空间。
  2. Highly configurable. Allows an application to incorporate only the capabilities it needs as it needs them, and to specify their quantity and size.第二,高度可配置。允许APP选定需要的组件进行组合,以便适配指定的大小和空间。
  3. Resources defined at compile-time. Requires all system resources be defined at compilation time, which reduces code size and increases performance.第三,编译时确定资源消耗。所有的系统资源在编译阶段即确定,这样可以降低代码大小同时提升了性能。
  4. Minimal error checking. Provides minimal run-time error checking to reduce code size and increase performance. An optional error-checking infrastructure is provided to assist in debugging during application development.第四,最少错误检查。为了降低代码大小并且提高性能,提供了最少的运行时错误检查。与此同时,一个可选的错误检查工具提供给开发人员在APP开发期间进行调试。
  5. Extensive suite of services Offers a number of familiar services for development:第五,大量的服务套件提供给开发使用。
    • Multi-threading Services for both priority-based, non-preemptive fibers and priority-based, preemptive tasks with optional round robin time-slicing.提供多线程服务,包括:基于优先级非抢占纤程和基于优先级抢占式的任务,并且可以选择Round-robin时间片(调度)
    • Interrupt Services for both compile-time and run-time registration of interrupt handlers.提供中断服务,包括:中断处理函数编译时注册和运行时注册两种方式
    • 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.提供内部线程数据传输服务,通过基本消息队列,增强的消息队列以及字节流方式
    • Memory Allocation Services for dynamic allocation and freeing of fixed-size or variable-size memory blocks.提供内存分配服务,通过动态分配和释放固定或者变化的内存块
    • Power Management Services such as tickless idle and an advanced idling infrastructure.提供电源管理服务,比如tickless空闲和高级空闲机制

Fundamental Terms and Concepts基本事项和概念

This section outlines the basic terms used by the Zephyr kernel ecosystem.该部分介绍了Zephyr内核生态系统常用的基本概念:

kernel
The set of Zephyr-supplied files that implement the Zephyr kernel, including its core services, device drivers, network stack, and so on.Zephyr
提供的文件集合用于实现Zephyr内核,包括核心服务,设备驱动,网络协议栈等等
application

The set of user-supplied files that the Zephyr build system uses to build an application image for a specified board configuration. It can contain application-specific code, kernel configuration settings, kernel object definitions, and at least one Makefile.

The application’s kernel configuration settings direct the build system to create a custom kernel that makes efficient use of the board’s resources.

An application can sometimes be built for more than one type of board configuration (including boards with different CPU architectures), if it does not require any board-specific capabilities.

用户提供的文件集合用于Zephyr构建特定单板配置的APP镜像。包括APP相关代码,内核配置项,内核对象定义以及makefile文件。

App内核配置选项指示构建系统创建有效使用 单板资源的定制内核。

如果不指定单板,一个APP有时能够针对多个单板配置进行构建。

application image

A binary file that is loaded and executed by the board for which it was built.

Each application image contains both the application’s code and the Zephyr kernel code needed to support it. They are compiled as a single, fully-linked binary.

Once an application image is loaded onto a board, the image takes control of the system, initializes it, and runs as the system’s sole application. Both application code and kernel code execute as privileged code within a single shared address space.

可被构建单板加载和执行二进制文件

每个APPimage包含APP代码和Zephyr内核代码两个部分。两者被编译成为单个全连接二进制文件。

一旦一个APP镜像被加载到单板上,镜像会控制该系统,初始化单板并且运行该App。App代码和内核代码在单个共享地址空间运行。

board

A target system with a defined set of devices and capabilities, which can load and execute an application image. It may be an actual hardware system or a simulated system running under QEMU.

The Zephyr kernel supports a variety of boards.

事先定义了一组设备和能力集合的目标系统,能够加载和运行相应的APP镜像。它既可以是实际的硬件系统也可以是基于QEMU的仿真系统。

board configuration

A set of kernel configuration options that specify how the devices present on a board are used by the kernel.

The Zephyr build system defines one or more board configurations for each board it supports. The kernel configuration settings that are specified by the build system can be over-ridden by the application, if desired.

内核配置选项集合,用于指定内核使用的设备是否存在于单板之上。

内核构建系统定义一个或者多个单板配置。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值