- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- 复制
- 微信扫一扫分享
- 已成功复制到剪贴板
Introduction to the Zephyr Project
展开查看详情
1 .ZEPHYR PROJECT OVERVIEW Ryan Qian, NXP, Jianghao.qian@nxp.com Kate Stewart, The Linux Foundation, stewart@linux.com
2 .RTOS Landscape 2018 2
3 . First Commits Total Total Commits in OS options commit controlled by Terms License Contributors Commits last month AliOS-Things 2017/09 Alibaba CLA Apache-2.0 36 470 6 Contiki 2006/06 community BSD-3-Clause 161 12,327 0 Contiki-NG 2006/06 community BSD-3-Clause 175 14,116 61 FreeRTOS* 2004/07 Richard Barry CLA GPL-2.0 w/ FreeRTOS exception 3 2,441 0 Amazon-FreeRTOS 2017/11 Amazon CLA MIT 3 12 1 LiteOS 2016/09 Huawei ?? BSD-3-Clause 18 203 3 mbed OS 2013/02 ARM CLA Apache-2.0 or BSD-3-Clause 419 17,048 282 myNewt 2015/06 community Apache-2.0 76 7,573 22 nuttX* 2007/? Gregory Nutt BSD-style? 244 36,531 184 RIOT 2010/09 community LGPL-2.1 189 18,324 25 RT-Thread 2009/06 community GPL-2.0 127 6,132 107 Tiny OS 2004/10 ?? BSD-3-Clause 44 3,807 0 Tizen RT 2015/04 Samsung ?? Apache-2.0 or BSD-style? 94 4,535 12 Zephyr 2014/11 community DCO Apache-2.0 304 21,633 591 Data extracted on 2018-06-25 from github (* from openhub.net) 3
4 .Zephyr in RTOS Landscape #2 #2 #1 Total Total Commits Contributors Commits (last 30 days) Rank RTOS # Rank RTOS # Rank RTOS # 1 mbed OS 419 1 nuttX 36,531 1 Zephyr 591 2 Zephyr 304 2 Zephyr 21,633 2 mbed OS 282 3 nuttX 244 3 RIOT 183,24 3 nuttX 184 4
5 .Zephyr in RTOS Landscape #2 #2 #1 Total Total Commits Contributors Commits (last 30 days) Very Active, Growing Community! 5
6 . Open Source, RTOS, Connected, Embedded Fits where Linux is too big Zephyr Project: • Open source real time operating system • Vibrant Community participation Zephyr OS • Built with safety and security in mind 3rd Party Libraries • Cross-architecture with growing developer tool support Application Services • Vendor Neutral governance OS Services • Permissively licensed - Apache 2.0 Kernel • Complete, fully integrated, highly HAL configurable, modular for flexibility, better than roll-your-own • Product development ready with LTS • Certification ready with Auditable 6
7 .Why Zephyr? The Zephyr OS addresses broad set of embedded use cases across a broad set of platforms and architectures using a modular and configurable infrastructure. It addresses the need for RTOS consolidation. • No single RTOS addresses • Modular and configurable • Roll your own is expensive & • Need for a solution or semi- Address Fragmentation Modular Infrastructure Open-Source Feature Richness broad set of embedded use infrastructure allows creation difficult to develop & maintain complete solution rather than cases across a broad set of of highly compact and optimal just an ingredient. platforms and architectures solutions for different products • Permissively licensed from a common origin corresponds to ease of • Lowers entry level barrier for • Disjoint use cases have led adoption new products and speeds up to fragmentation in RTOS • Reuse allows NRE costs to be software delivery using existing space amortized across multiple • Corporate sponsorship assures feature and hardware support products and solutions long term commitment and • Existing commercial longevity • Encourages adherence to solutions force roll your • Multi-architecture support standards and promotes own solutions and reduces platform switching • Community innovation has collaboration on complex duplication of software costs and vendor lock-in proven faster for progression features inside the organization components concerns and project development is a collaboration of industry experts • Developers focus on the end- user facing interfaces instead of re-inventing low level interfaces Reduce costs and improve efficiency through reuse 7
8 .Zephyr Ecosystem Zephyr OS Zephyr “Community” Kernel / HAL • Scheduler • Kernel objects and services • The kernel and HAL • low-level architecture and board support • OS Services such as IPC, Logging, file Zephyr Project systems, crypto • power management hooks and low level interfaces to hardware Zephyr Project OS Services and Low level APIs • SDK, tools and development • Platform specific drivers Zephyr OS environment • Generic implementation of I/O APIs • Additional middleware and features • File systems, Logging, Debugging and IPC • Device Management and Bootloader Kernel / HAL • Cryptography Services • Networking and Connectivity OS Services • Device Management Application Services Zephyr Community Application Services • 3rd Party modules and libraries • High Level APIs • Support for Zephyr in 3rd party • Access to standardized data models projects, for example: Jerryscript, • High Level networking protocols Micropython, Iotivity, EdgeX
9 .Architecture Application ● Highly Configurable, Highly Modular Application Services Smart Objects / High Level APIs / Data Models … LWM2M MQTT HTTP CoAP ● Cooperative and Pre-emptive Threading DTLS TLS ● Memory and Resources are typically statically TCP/UDP allocated TThread Management h re a d Management RPL Device Device IPv6/IPv4 ● 6LoWPAN 15.4 BLE Wi-Fi* NFC* ... Integrated device driver interface OS Services Low Level API ● Memory Protection: Stack overflow protection, Properties Database/ Database/ Properties Kernel object Kernel object and and device device driver driver permission permission Logging/ Sensors System Crypto Debug UART GPIO IPC File SPI tracking, Thread Thread isolation isolation I2C ... … tracking, Kernel Services / Schedulers ● Bluetooth® Low Energy (BLE 4.2, 5.0) with both kernel controller and host, BLE Mesh Power Management Platform ● ● Native, fully Native, fully featured featured and and optimized optimized networking networking Radios Sensors Crypto HW Flash stack stack Fully featured OS allows developers to focus on the application 94
10 .Zephyr Hardware Architecture Families 10
11 .Growing Diverse Community! Repositories • 2016/2: 5 1.12 release statistics: • 2018/6: 15 › 13 weeks cycle, with 2 weeks • 2016/2: 80 of merge window Authors • 2018/6: 401 (OS++) › 1,978 changes (patch commits) • 2016/2: 2,806 Commits • 2018/6: 25,356 (OS++) › 111 developers identified › 17 companies participated • 2016/2: 4 › 21 changes / day ( .9/hour) Boards • 2018/6: 96 in progress
12 .Zephyr Project: Membership Momentum February 2016 June 2018 and others…. 12
13 .Sample of Board Support Nucleo 103RB Nucleo64 L476RG Nucleo F411RE NRF52 pca10040 Nucleo F334R8 Synopsys EMSK SiFive HiFive1 Arduino Due NRF51 Arduino 101 Minnowboard Altera MAX10 Nucleo 401RE Hexiwear ARM V2M MPS2 STM3210c Atmel SAM E70 Adafruit Feather NRF52 Seeed Carbon TI Launchpad Wifi BBC Microbit STM32373c Redbear BLE Nano 96b Neon Key Galileo NXP FRDM K64F Quark D2000 STM32 Olimexino STM Mini A15 Seeed Nitrogen ARM V2M Beetle Zedboard NXP FRDM-KW41Z tinyTILE NXP i.MX RT1050 Pulpino 96 BOARDS TODAY WITH MORE ON WAY… http://docs.zephyrproject.org/boards/boards.html
14 .Products Running Zephyr Today Ellcie-Healthy Smart Connected Eyewear Rigado IoTGateway ProGlove scanning gloves Intellinium Safety Shoes Grush Gaming Toothbrush hereO Smartwatch Blocks Modular Smartwatch Antmicro Badge GNARBOX 2.0 SSD 14
15 .Developer Tools... Synopsys DesignWare ARC Development Tools 15
16 .Zephyr Roadmap 2018 2018 Jan Feb Mar Apr May Jun July Aug Sept Oct Nov Dec Zephyr Releases ♦ ♦ 1.12 ♦ ♦ 1.14 1.11 1.13 Zephyr 1.11 Zephyr 1.12 Zephyr 1.13 (LTS?) Future • OpenThread support • AMP Support • QM level qualification • Safety and Security Pre- • Native POSIX Port • 802.1Q - Virtual LANs • MISRA-C 2012: Kernel Certification • POSIX API Layer (PSE52) • Persistant Storage for BT • LLVM Support • Time Sensitive • FOTA Updates (LWM2M, • TAP net device support • Precision Time Protocol Networking (TSN) BLE) • SPI slave support (PTP) Support Support • SMP Support • CanBUS support • Improved Logging • TEE for ARMv8-M • Lightweight Flash • Source Code Support • LoRa Support Storage modularisation: Support • Eco-System: Tracing, • SocketCAN • Support the kernel external modules, boards, Profiling, debugging • Paging Support (scheduler + objects) as SoCs support through 3rd • Dynamic Module Loading a separate module • Command line meta-tool party tools • Enhanced Sensor “west” • Multiple Git Repos support (support HW • WIFI driver • Soft real-time tasklets FIFOs) • Advanced Power Mgmt. • MIPS NOTE: Features aligned to releases are subject to change per guidance from the TSC
17 .Zephyr • 真正的开源软件(Linux Foundation),宽松自由的许可证(Apache 2.0) • 针对MCU的OS,占用内存小 (~2KB) • 支持多种架构 (x86/ARM/RISCV/ARC, etc) • 社区支持 • LTS计划 17
18 .Zephyr的架构 Zephyr Native Drivers Intel® Quark™ Microcontroller Software Interface (QMSI) ARM* Cortex* Microcontroller Software Interface Standard (CMSIS) NXP MCUXpresso SDK .... 18
19 .Zephyr硬件支持结构 Board 1 Board 2 Board 3 Board 4 Board 5 Board 6 SoC 1 SoC 2 SoC 3 SoC 4 SoC 5 SoC 6 SoC Series 1 SoC Series 2 SoC Series 3 SoC Family 1 SoC Family 2 SoC Family 3 CPU Core 1 CPU Core 2 Architecture 19
20 .Zephyr的特性 • 多线程支持 • 线程间同步/通信 • Semaphore, mutex, alerts / Mailbox, pipe, message queue, FIFO, LIFO, stack • 内存管理 • Slab/Pool/Heap pool • Tickless idle • 模块化 20
21 .Zephyr的安全性 Cloud Services CoAP, MQTT, HTTP • 无动态加载 Communication Security • 内存保护 • 基于TinyCrypt2和mbedtls的加密 库 IPv4 IPv6/6LoWPAN DTLS • 提供了标准化的通信协议栈构建单 Crypto Libraries and Services 元 Device Management: LWM2M Stack Protection Device Security HW Crypto Engine Secure Boot, TEE** 21
22 .Zephyr连接性 Application Application Application Application LWM2M MQTT SEP 2.0 CoAP HTTP ZigBee* Transport TCP/UDP TCP Thread RPL Network IPv6 6LoWPAN 3GPP Bluetooth® 5.0 IEEE 802.15.4 Data Link Low Energy Wi-Fi* NFC PHY 22
23 .Zephyr Bluetooth • Bluetooth 5.0 compliant (ESR10) • BLE Mesh • Bluetooth Low Energy Controller support (LE Link layer) • Generic Access Profile with all possible LE roles • GATT • Pairing support • IPSP/6LoWPAN for IPv6 connectivity over Bluetooth LE • Basic Bluetooth BR/EDR (Classic) support • Clean HCI driver abstraction • Raw HCI interface to run Zephyr as a controller instead of a full Host stack • Verified with multiple poplar controllers • Highly configurable 23
24 .Zephyr Networking • IPv6 (enabled by default) • IPv4 • Dual stack support • UDP/TCP • BSD sockets API • HTTP/MQTT/CoAP • LWM2M/RPL/DNS • Minimal copy network buffer management • Virtual LAN support • Network traffic classification 24
25 .Zephyr开发 • 详细的文档 • 使用cmake构建工程(make/ninja) • Kconfig,Linux内核配置工具 • 功能丰富Zephyr专门的SDK(powered by Yocto project) • 多平台编译支持:Linux/Windows/MacOS • 支持Docker容器 25
26 .Zephyr & NXP i.MXRT105x Crossover Processor with Arm® Cortex®-M7 core • i.MXRT • i.MXRT105x • i.MX • Highest performing Arm Cortex-M7 • i.MX7_m4 • 3020 CoreMark/1284 DMIPS @ 600 MHz • Kinetis • Up to 512KB Tightly Coupled Memory (TCM) • K6x • Industry’s lowest dynamic power with an integrated DC-DC • KL2x converter • KW4x • 2D graphics acceleration engine • • LPC Parallel camera sensor interface • LCD display controller (up to WXGA 1366x768) • LPC54xxx • 3x I2S for high-performance, multichannel audio • Extensive external memory interface options http://www.nxp.com/zephyr 26
27 .Code Repositories Audit Ready Documentation (PLATINUM Backports & Keeping MEMBERS ONLY) Configurations in Sync Long Term Development Support Auditable Community “Stable” Safety & Security Contributions Processes via DCO Products Ready Releases Products to be Certified 27
28 .Zephyr OS: Auditable Code Base • Initial and subsequent certification targets to be decided by Governing Board. • An auditable code base will be established from a subset of Zephyr OS. • Code bases will be kept in sync from that point forward. • More rigorous processes (necessary for certification) will be applied before new features move into the auditable code base. Processes to achieve selected certification to be determined by Security Working Group and coordinated with Technical Steering Committee. 28
29 .Zephyr OS: Candidate Standards Coding for Safety, Security, Portability and Reliability in Embedded Systems: • MISRA C:2012, with Amendment 1, following MISRA C Compliance:2016 guidance Safety: • IEC 61508: 2010 (SIL 3 initially, eventually though like to get to SIL 4) • broadest for robotics and autonomous vehicle engineering companies. Reference for other standards in Robotics domain. • Sampled Certifications derived from IEC 61508: Medical: IEC 62304; Auto: ISO 26262; Railway: EN 50128 Security: • Common Criteria (EAL4 but possibly higher) Others: • Medical: FDA 510(K), ISO 14971, IEC 60601; Industrial: UL 1998, ?? 29