Zephyr: Creating a
Best-of-Breed, Secure
RTOS for IoT
Kate Stewart, The Linux Foundation
Wayne Ren, Synopsys
Yanan Liu, ZTE
Frank Wang, Linaro
What is Zephyr™ Project?
2
Small Footprint
RTOS for IoT
• As small as 8KB
• Enables
application code
to scale
• Configurable
• Modular
Truly Open
Source
• Hosted by Linux
Foundation
• Transparent
development
• Apache 2.0
License
Cross
Architecture
• ARM
• x86
• ARC
• RISC-V
• Tensilica
• Nios II
Why Does the Industry Need
RTOS Consolidation?
2/21/2017 3
Limited options that include security
for connected, constrained devices
No single RTOS for
IoT use cases x-platforms
OEMs and Devs need a
solution they can influence
High NRE hindering
Mass adoption
Roll your own demands
high level of maintenance
Fragmentation
with large number of choices
...and collaborate on security and safety with others
Who are Project Members?
Platinum
Members
Silver
Members
Associate
Members
and others...
Which Architectures Are
Supported by Zephyr Today?
5
How Do We Help Our
Community Grow?
Transition of code to
GitHub for easier
contributions
Continuously
broadening
architecture and board
support
More transparency
with an open TSC &
community interaction
via JIRA
Status:
Gaining Community Momentum
•2016/02: 5
•2017/06: 10
Repositories
•2016/02: 80
•2017/06: 189
Authors
•2016/02: 2,806
•2017/06: 13,319
Commits
•2016/02: 4
•2017/06: 57+
Boards
Zephyr Project Launch
February 17, 2016
Status:
Sample of Boards Supported
Arduino 101
FRDM K64F
Quark D2000
Galileo
Arduino Due
Minnowboard
STM Mini A15
Nucleo 103RB
STM32 Olimexino
Synopsys EMSK
Altera MAX10
NRF52
NRF51
Seeed Carbon
Seeed Nitrogen
Nucleo 401RE
Nucleo64 L476RG
Hexiwear
TI Launchpad Wifi
ARM V2M Beetle
Nucleo F411RE
ARM V2M MPS2
FRDM-KW41Z
BBC Microbit Redbear BLE Nano
Zedboard Pulpino
Nucleo F334R8
STM3210c
STM32373c
NRF52 pca10040
Atmel SAM E70
tinyTILE
Currently 57 boards supported today with more on way
Zephyr OS
• The kernel and HAL
• OS Services such as IPC,
Logging, file systems, crypto
Zephyr Project
• SDK, tools and development
environment
• Additional middleware and
features
• Device Management and
Bootloader
Zephyr Community
• 3rd Party modules and libraries
• Support for Zephyr in 3rd party
projects, for example:
Jerryscript, Micropython, Iotivity
Status:
Eco-System Emerging
Zephyr “Community”
Zephyr Project
Zephyr OS
Kernel / HAL
OS Services
Application Services
Kernel / HAL
•Scheduler
•Kernel objects and services
•low-level architecture and board support
•power management hooks and low level
interfaces to hardware
OS Services and Low level APIs
•Platform specific drivers
•Generic implementation of I/O APIs
•File systems, Logging, Debugging and
IPC
•Cryptography Services
•Networking and Connectivity
•Device Management
Application Services
•High Level APIs
•Access to standardized data models
•High Level networking protocols
Zephyr Project Roadmap
Zephyr OS 1.7 Zephyr OS 1.8 Zephyr OS 1.9 Zephyr OS 1.10
• Unified Kernel continued
• Direct Interrupt handling
• CMSIS support
• Native IP Stack
• New Net and L2
APIs
• Native
protocols:
MQTT, HTTP
Library, CoAP
(Zoap), NATS
• Iotivity/OCF
• Device Tree
• Bootloader Support
• Openocd support
• RISC V Port
• Xtensa Port
• Tickless Kernel
• BT 5.0 Features
• Eco System: Tracing,
debugging support through
3rd party tools
• Improved Build and Debug
• 3rd Party Compilers Support
• Xtensa GCC support
• Improved Build on
Mac/Windows
• MMU/MPU: Initial support
(WIP)
• Expand device support
• POSIX API Layer
• BSD Socket Support
• Expand Device Tree support to
more architectures
• BLE Mesh
• Full Bluetooth 5.0 Support
• LWM2M (→)
• Thread Protocol (initial drop) (→)
• Expand LLVM Support to more
architectures
• MMU/MPU (Cont.): Thread
Isolation, Paging (→)
• Revamp Testsuite, Increase
Coverage
• Build and Configuration System
(CMake) (→)
• Zephyr SDK NG
• Eco System: Tracing, debugging
support through 3rd party tools
• SMP Support
• AMP Support
• FOTA Updates,
Integration with
Bootloader (←)
• IDE Integration
• MMU/MPU (Cont.)
2016 2017
Aug Sept Oct Nov Dec Jan Feb Mar Apr May Jun July Aug Sept Oct Nov Dec
Zephyr OS Releases
♦1.6
♦1.5
♦1.7
♦1.8
♦1.9
♦1.10
(←) potentially pull in
(→) potentially push out
Zephyr Project: Safety & Security Vision
Security and Global IoT
2/21/2017 11
Zephyr Project & Securing IoT
“… to maintain and address all security concerns in the
sector, both software and hardware security chips should
be used.” – Technavio, January 2017
● Focus on addressing security needs of connected,
resource constrained devices
● Work group focused on defining the safety &
security strategy and development plans
● Membership marries HW & SW security expertise
and investment through open source development
● The goal of working group to develop a safety &
security auditable version of the OS
Global internet of things security market is expected to grow at a CAGR of nearly 48% during the period
2017-2021 – Technavio, January 2017
Code Repositories
12
Development
Long Term
Support
“Stable”
Auditable
Community
Contributions
via DCO
Releases Products
Safety &
Security
Processes
Products Ready to
be Certified
Audit Ready
Documentation
(PLATINUM
MEMBERS ONLY)
Backports & Keeping
Configurations in Sync
Zephyr OS: Auditable Code Base
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.
13
Zephyr Project Governance
Governing Board
•Decides project goals
•Sets business, marketing
and legal decisions
•Prioritizes investments and
oversees budget
•Oversees marketing such
as PR/AR, branding, others
•Identifies member
requirements
Technical Steering Committee
•Sets direction and serves as the
highest technical decision body
consisting of project maintainers
and voting members
•Coordinates across community
collaboration
•Sets up new projects
•Coordinates releases
•Enforces development
processes
•Moderates working groups
•Oversees relationships with other
relevant projects
Community
•Code base open to all
contributors, need not
be a member to
contribute.
•Path to committer and
maintainer status
through peer assessed
merit of contributions and
code reviews
•Ecosystem enablement
Governing
Board
Financial &
Policy
Oversight
Marketing
Oversight
SW
Certification
Oversight
Technical
Steering
Committee
Kernel &
Subsystem
Maintainers
Security
Maintainer
Developer
Tools
Maintainers
Architecture
Maintainers
Contributors
Individual
Contributors
Member
Organization
s
Supporting
Organization
s
Others
Goal: Separate business decisions from meritocracy, technical decisions
© 2017 Synopsys, Inc.15
Wayne Ren
2017.06.19
Synopsys
Experience: The Zephyr Project
© 2017 Synopsys, Inc.16
Why Synopsys joined in Zephyr
•Best-Of-Breed RTOS
– High quality code, networking stack, Bluetooth stack, utilities
•Open and Free
– Multi architecture support - ARC, ARM, x86
•License
– Apache 2.0 License, commercial friendly
•Strategic Founding Members
– Intel, NXP, Synopsys
•Rapidly Growing Community
– Mailing list, web site, Github
•Re-use of familiar Linux build & configuration system
– Kbuild, Kconfig, Device tree
© 2017 Synopsys, Inc.17
ARC EM Starter Kit (EMSK)
Highlights:
o Selectable ARC EM core
configurations
o Timers, Watchdog Timer
o UARTs, SPI, I2
C, micro
USB
o SD Card slot, 20-pin JTAG
o 6 Pmod™ Extension
connectors
o 5 buttons, 4 switches, 9
LEDs
o Over 50 application
examples
Low-cost and versatile software development
system for rapid application development and
debugging for ARC EM processors
© 2017 Synopsys, Inc.18
Zephyr-based 9D Motion Sensor on ARC EMSK
Highlights:
o Microkernel on ARC
o I2C bus, SPI sensor
interfaces
o Bluetooth module via
UART
o Interrupt driven
o Sensor processing: 3x
3D input to
Yaw/Pitch/Roll
o Bluetooth link to host
application
Extension
Pmods
• Gyroscope
• Accelerome
ter
• Magnetome
ter
• Bluetooth
Efficient smart sensor data fusion using
Zephyr on an ultra-low power ARC EM
processor
© 2017 Synopsys, Inc.19
Working and Contributing with Zephyr Project
•To use Zephyr
– Seamless switch for developers with embedded Linux experience
– A lot of web docs and demos & examples available for new developers
•Contribute in Zephyr - Now simpler with GitHub!
– Fork and clone GitHub repo
– Submit changes via Pull Requests
– Raise issues for bugs, enhancement and features as issues on GitHub
– Participate in discussions on developer mailing list
•Challenges
– Build system not supported well in Windows
– Minimal IDE support
Thank You
Solution Department
SANECHIPS Technology Co,. Ltd
SANECHIPS & Zephyr
Cooperation with Zephyr
- Using Zephyr OS
- Join Linaro LITE group
- Support NB-IoT
- Chip level security
Requirement for IoT OS
- Tiny memory overhead
- Stable IP Stack
- Rich device drivers
- Open ecosystem
- Stable, efficient IDE
Contribution to Zephyr
- [TCP/IP] 8 JIRA activities
- 3 accepted
- 3 closed
- 2 patches upstreamed
- [OS] 3 JIRA activities
- being reviewed
SANECHIPS SDE
(IoT Application Develop Platform)
SDE satisfy these features
● Hardware JTAG debug, instead of gdb_server/kgdb, debug on
memory constrained device
● Deeply optimized UI and exception management, effective and
stable method
● Support Zephyr OS and TCP/IP visible debug
● Support 3rd
component visible debug
6.30
Debug requirement for IoT chips
● Memory constrained, print log is not available
● Zephyr OS, visible debug of kernel/driver/net/etc for our client
7.30 8.30
M0 Basic version M0 Stable version Zephyr Supported
Requirement
Schedule
Solution
THANK YOU
● Collaboration on software and standards for ARM in IoT
● Zephyr
○ Open source and open governance
○ Cross architecture
○ Commercial friendly license
○ Clean design to meet growing IoT complex needs
The Linaro IoT & Embedded Group (LITE)
Linaro enables Zephyr on ARM
* Please see the list at https://www.zephyrproject.org/doc/boards/boards.html
Linaro unifies Zephyr on ARMs
96Board facilitates the delivery of
- Single Zephyr software base
- Single APP/Solution
- Across all SoCs/Boards
- Your focus on differentiation
Single Zephyr supports different BLE
Single Zephyr supports different WiFi
Single Zephyr supports other usages (To add
more… )
IoT problems to solve:
- Security
- Cloud connection
- Developer
- Portable
- Driver
All in an unifed SW solution
IoT needs more around Zephyr
Linaro develops full IoT end-to-end solution
- Unified SW stack across all ARM MCUs
Due to 96Board
- Zephyr is the RTOS
- All the technologies built enable
Sensor data to the cloud
Signed FOTA image to device
6LoWPAN over BLE
etc… more to see a real demo
Welcome to join Linaro
Set SW standards and implement
Build unified SW ecosystem on ARM
Thank you
Summary:
Benefits of Adopting Zephyr Project
• Roll your own is expensive & difficult to develop & maintain
• Permissively licensed corresponds to ease of adoption
• Multiple corporate sponsorships assures long term
commitment and longevity
• Long standing reputation of open source investment
among current membership
• Community innovation has proven faster for progression
• Project development is a collaboration of industry experts
Join us!
• Explore the project
• Download the code
https://github.com/zephyrproject-rtos/zephyr
• We welcome community contributions
• Engage via GitHub, Mailing List, IRC
• Consider the possibility of becoming a
sponsoring member of Zephyr project to
shape the future direction of the project
Participate!
36
Examine the code
(https://github.com/zephyrproject-rtos/)
contribute and join us!
Impact architecture Direction Marketing / Advocacy Decision making
www.zephyrproject.org

Zephyr: Creating a Best-of-Breed, Secure RTOS for IoT

  • 1.
    Zephyr: Creating a Best-of-Breed,Secure RTOS for IoT Kate Stewart, The Linux Foundation Wayne Ren, Synopsys Yanan Liu, ZTE Frank Wang, Linaro
  • 2.
    What is Zephyr™Project? 2 Small Footprint RTOS for IoT • As small as 8KB • Enables application code to scale • Configurable • Modular Truly Open Source • Hosted by Linux Foundation • Transparent development • Apache 2.0 License Cross Architecture • ARM • x86 • ARC • RISC-V • Tensilica • Nios II
  • 3.
    Why Does theIndustry Need RTOS Consolidation? 2/21/2017 3 Limited options that include security for connected, constrained devices No single RTOS for IoT use cases x-platforms OEMs and Devs need a solution they can influence High NRE hindering Mass adoption Roll your own demands high level of maintenance Fragmentation with large number of choices ...and collaborate on security and safety with others
  • 4.
    Who are ProjectMembers? Platinum Members Silver Members Associate Members and others...
  • 5.
  • 6.
    How Do WeHelp Our Community Grow? Transition of code to GitHub for easier contributions Continuously broadening architecture and board support More transparency with an open TSC & community interaction via JIRA
  • 7.
    Status: Gaining Community Momentum •2016/02:5 •2017/06: 10 Repositories •2016/02: 80 •2017/06: 189 Authors •2016/02: 2,806 •2017/06: 13,319 Commits •2016/02: 4 •2017/06: 57+ Boards Zephyr Project Launch February 17, 2016
  • 8.
    Status: Sample of BoardsSupported Arduino 101 FRDM K64F Quark D2000 Galileo Arduino Due Minnowboard STM Mini A15 Nucleo 103RB STM32 Olimexino Synopsys EMSK Altera MAX10 NRF52 NRF51 Seeed Carbon Seeed Nitrogen Nucleo 401RE Nucleo64 L476RG Hexiwear TI Launchpad Wifi ARM V2M Beetle Nucleo F411RE ARM V2M MPS2 FRDM-KW41Z BBC Microbit Redbear BLE Nano Zedboard Pulpino Nucleo F334R8 STM3210c STM32373c NRF52 pca10040 Atmel SAM E70 tinyTILE Currently 57 boards supported today with more on way
  • 9.
    Zephyr OS • Thekernel and HAL • OS Services such as IPC, Logging, file systems, crypto Zephyr Project • SDK, tools and development environment • Additional middleware and features • Device Management and Bootloader Zephyr Community • 3rd Party modules and libraries • Support for Zephyr in 3rd party projects, for example: Jerryscript, Micropython, Iotivity Status: Eco-System Emerging Zephyr “Community” Zephyr Project Zephyr OS Kernel / HAL OS Services Application Services Kernel / HAL •Scheduler •Kernel objects and services •low-level architecture and board support •power management hooks and low level interfaces to hardware OS Services and Low level APIs •Platform specific drivers •Generic implementation of I/O APIs •File systems, Logging, Debugging and IPC •Cryptography Services •Networking and Connectivity •Device Management Application Services •High Level APIs •Access to standardized data models •High Level networking protocols
  • 10.
    Zephyr Project Roadmap ZephyrOS 1.7 Zephyr OS 1.8 Zephyr OS 1.9 Zephyr OS 1.10 • Unified Kernel continued • Direct Interrupt handling • CMSIS support • Native IP Stack • New Net and L2 APIs • Native protocols: MQTT, HTTP Library, CoAP (Zoap), NATS • Iotivity/OCF • Device Tree • Bootloader Support • Openocd support • RISC V Port • Xtensa Port • Tickless Kernel • BT 5.0 Features • Eco System: Tracing, debugging support through 3rd party tools • Improved Build and Debug • 3rd Party Compilers Support • Xtensa GCC support • Improved Build on Mac/Windows • MMU/MPU: Initial support (WIP) • Expand device support • POSIX API Layer • BSD Socket Support • Expand Device Tree support to more architectures • BLE Mesh • Full Bluetooth 5.0 Support • LWM2M (→) • Thread Protocol (initial drop) (→) • Expand LLVM Support to more architectures • MMU/MPU (Cont.): Thread Isolation, Paging (→) • Revamp Testsuite, Increase Coverage • Build and Configuration System (CMake) (→) • Zephyr SDK NG • Eco System: Tracing, debugging support through 3rd party tools • SMP Support • AMP Support • FOTA Updates, Integration with Bootloader (←) • IDE Integration • MMU/MPU (Cont.) 2016 2017 Aug Sept Oct Nov Dec Jan Feb Mar Apr May Jun July Aug Sept Oct Nov Dec Zephyr OS Releases ♦1.6 ♦1.5 ♦1.7 ♦1.8 ♦1.9 ♦1.10 (←) potentially pull in (→) potentially push out
  • 11.
    Zephyr Project: Safety& Security Vision Security and Global IoT 2/21/2017 11 Zephyr Project & Securing IoT “… to maintain and address all security concerns in the sector, both software and hardware security chips should be used.” – Technavio, January 2017 ● Focus on addressing security needs of connected, resource constrained devices ● Work group focused on defining the safety & security strategy and development plans ● Membership marries HW & SW security expertise and investment through open source development ● The goal of working group to develop a safety & security auditable version of the OS Global internet of things security market is expected to grow at a CAGR of nearly 48% during the period 2017-2021 – Technavio, January 2017
  • 12.
    Code Repositories 12 Development Long Term Support “Stable” Auditable Community Contributions viaDCO Releases Products Safety & Security Processes Products Ready to be Certified Audit Ready Documentation (PLATINUM MEMBERS ONLY) Backports & Keeping Configurations in Sync
  • 13.
    Zephyr OS: AuditableCode Base 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. 13
  • 14.
    Zephyr Project Governance GoverningBoard •Decides project goals •Sets business, marketing and legal decisions •Prioritizes investments and oversees budget •Oversees marketing such as PR/AR, branding, others •Identifies member requirements Technical Steering Committee •Sets direction and serves as the highest technical decision body consisting of project maintainers and voting members •Coordinates across community collaboration •Sets up new projects •Coordinates releases •Enforces development processes •Moderates working groups •Oversees relationships with other relevant projects Community •Code base open to all contributors, need not be a member to contribute. •Path to committer and maintainer status through peer assessed merit of contributions and code reviews •Ecosystem enablement Governing Board Financial & Policy Oversight Marketing Oversight SW Certification Oversight Technical Steering Committee Kernel & Subsystem Maintainers Security Maintainer Developer Tools Maintainers Architecture Maintainers Contributors Individual Contributors Member Organization s Supporting Organization s Others Goal: Separate business decisions from meritocracy, technical decisions
  • 15.
    © 2017 Synopsys,Inc.15 Wayne Ren 2017.06.19 Synopsys Experience: The Zephyr Project
  • 16.
    © 2017 Synopsys,Inc.16 Why Synopsys joined in Zephyr •Best-Of-Breed RTOS – High quality code, networking stack, Bluetooth stack, utilities •Open and Free – Multi architecture support - ARC, ARM, x86 •License – Apache 2.0 License, commercial friendly •Strategic Founding Members – Intel, NXP, Synopsys •Rapidly Growing Community – Mailing list, web site, Github •Re-use of familiar Linux build & configuration system – Kbuild, Kconfig, Device tree
  • 17.
    © 2017 Synopsys,Inc.17 ARC EM Starter Kit (EMSK) Highlights: o Selectable ARC EM core configurations o Timers, Watchdog Timer o UARTs, SPI, I2 C, micro USB o SD Card slot, 20-pin JTAG o 6 Pmod™ Extension connectors o 5 buttons, 4 switches, 9 LEDs o Over 50 application examples Low-cost and versatile software development system for rapid application development and debugging for ARC EM processors
  • 18.
    © 2017 Synopsys,Inc.18 Zephyr-based 9D Motion Sensor on ARC EMSK Highlights: o Microkernel on ARC o I2C bus, SPI sensor interfaces o Bluetooth module via UART o Interrupt driven o Sensor processing: 3x 3D input to Yaw/Pitch/Roll o Bluetooth link to host application Extension Pmods • Gyroscope • Accelerome ter • Magnetome ter • Bluetooth Efficient smart sensor data fusion using Zephyr on an ultra-low power ARC EM processor
  • 19.
    © 2017 Synopsys,Inc.19 Working and Contributing with Zephyr Project •To use Zephyr – Seamless switch for developers with embedded Linux experience – A lot of web docs and demos & examples available for new developers •Contribute in Zephyr - Now simpler with GitHub! – Fork and clone GitHub repo – Submit changes via Pull Requests – Raise issues for bugs, enhancement and features as issues on GitHub – Participate in discussions on developer mailing list •Challenges – Build system not supported well in Windows – Minimal IDE support
  • 20.
  • 21.
  • 22.
    SANECHIPS & Zephyr Cooperationwith Zephyr - Using Zephyr OS - Join Linaro LITE group - Support NB-IoT - Chip level security Requirement for IoT OS - Tiny memory overhead - Stable IP Stack - Rich device drivers - Open ecosystem - Stable, efficient IDE Contribution to Zephyr - [TCP/IP] 8 JIRA activities - 3 accepted - 3 closed - 2 patches upstreamed - [OS] 3 JIRA activities - being reviewed
  • 23.
    SANECHIPS SDE (IoT ApplicationDevelop Platform) SDE satisfy these features ● Hardware JTAG debug, instead of gdb_server/kgdb, debug on memory constrained device ● Deeply optimized UI and exception management, effective and stable method ● Support Zephyr OS and TCP/IP visible debug ● Support 3rd component visible debug 6.30 Debug requirement for IoT chips ● Memory constrained, print log is not available ● Zephyr OS, visible debug of kernel/driver/net/etc for our client 7.30 8.30 M0 Basic version M0 Stable version Zephyr Supported Requirement Schedule Solution
  • 24.
  • 25.
    ● Collaboration onsoftware and standards for ARM in IoT ● Zephyr ○ Open source and open governance ○ Cross architecture ○ Commercial friendly license ○ Clean design to meet growing IoT complex needs The Linaro IoT & Embedded Group (LITE)
  • 26.
    Linaro enables Zephyron ARM * Please see the list at https://www.zephyrproject.org/doc/boards/boards.html
  • 27.
    Linaro unifies Zephyron ARMs 96Board facilitates the delivery of - Single Zephyr software base - Single APP/Solution - Across all SoCs/Boards - Your focus on differentiation
  • 28.
  • 29.
    Single Zephyr supportsdifferent WiFi
  • 30.
    Single Zephyr supportsother usages (To add more… )
  • 31.
    IoT problems tosolve: - Security - Cloud connection - Developer - Portable - Driver All in an unifed SW solution IoT needs more around Zephyr
  • 32.
    Linaro develops fullIoT end-to-end solution - Unified SW stack across all ARM MCUs Due to 96Board - Zephyr is the RTOS - All the technologies built enable Sensor data to the cloud Signed FOTA image to device 6LoWPAN over BLE etc… more to see a real demo
  • 33.
    Welcome to joinLinaro Set SW standards and implement Build unified SW ecosystem on ARM Thank you
  • 34.
    Summary: Benefits of AdoptingZephyr Project • Roll your own is expensive & difficult to develop & maintain • Permissively licensed corresponds to ease of adoption • Multiple corporate sponsorships assures long term commitment and longevity • Long standing reputation of open source investment among current membership • Community innovation has proven faster for progression • Project development is a collaboration of industry experts
  • 35.
    Join us! • Explorethe project • Download the code https://github.com/zephyrproject-rtos/zephyr • We welcome community contributions • Engage via GitHub, Mailing List, IRC • Consider the possibility of becoming a sponsoring member of Zephyr project to shape the future direction of the project
  • 36.
    Participate! 36 Examine the code (https://github.com/zephyrproject-rtos/) contributeand join us! Impact architecture Direction Marketing / Advocacy Decision making
  • 37.