Technical Overview 11 October 2016 Problem and Context
First release of a successful connected product…
…. now make that repeatable please. An Open Source OS for MCUs
• Open source networking stacks: Bluetooth Host and Controller
• Pre-emp ve, ckless RTOS with power management
Security • Secure bootloader and Image Upgrade Networking Stats & Console & Config & • Flash FS and Access Mechanisms Logging Shell Upgrade Drivers Power • Build & Package Management OS HAL • Management Interfaces Secure Bootloader & FFS A Community Driven OS
Why Apache So ware Founda on? Cloud Providers IP Providers • Liberal, BSD-style license • Strong Licensing and IP policies • Meritocracy • Free to contribute, contributors control project direc on. • History of working with large organiza ons: IBM, Pivotal/ EMC, Microso . • Many years experience managing large, complex projects (e.g., Apache, Hadoop,
MCU Vendors End-Users Subversion)
Community driven open source best way to maintain healthy ecosystem RTOS
• Tickless opera on: low power hooks
• Driver Interface
• Pre-emp ve, mul tasking RTOS • Strict priority-based scheduling • Up to 253 different priority levels
• Unified buffer management
• Resource u liza on tracking and watchdog
• High-resolu on mers
• Built-in tasks: • Idle RTOS - Event Driven Model
• Event Queues provide a mechanism for “mostly-sleeping” asynchronous tasks
• Wake-up on: • Message from another Task • Timer • I/O state change • Incoming packet • Watchdog
• Perform opera ons: • Send an alert • Respond to a request • Schedule a wakeup
• Go back to sleep Apache Mynewt Connec vity Layer (Run me’s View)
Management App App OIC 1.1
CoAP, MQTT, HTTP
GATT TLS or DTLS
L2CAP TCP UDP
HCI IPv4 IPv6 + Thread IPv6
BLE 4.2 Wi-Fi Bluetooth 5 LPWA 3GPP
1.0 – First beta end of October!
Standards-based IoT communica on Highlights: Apache Mynewt Networking
• Nordic nRF51 and nRF52 support • Simultaneous Central and Peripheral modes • Supports up to 32 connec ons Bluetooth • Combined (host + controller), host- 4.2 only and controller-only mode • Compa ble with BlueZ • 40% less code versus licensed binaries in peripheral-only mode
• Abstracted interface to Wi-Fi supplicants, and socket layer Wi-Fi • LWIP integrated to provide na ve-IP support. • Support for WINC1500...more soon! Highlights: Challenges Managing Connected Products
• Well-defined drivers and HAL interfaces Cross-pla orm • Build and package management system Support op mized to understand BSP and link op ons
• Build tool creates signed images So ware • Image download over Serial, BLE and Wi-Fi Upgrade • Bootloader verifies SHA-256/RSA/ECC-DSA signature
• Consistent logging and sta s cs infrastructure • Core dumps Debugging • Kernel-level support: sanity, stack guards, memory tracking
• Hard sleep and wakeup support (low RAM Power states) Mgmt • Tickless ‘idle’ and driver suspend • Networking stack sleep management Build, Package, and Project Management: newt tool
• Composable System • Install and Upgrade • Open-source project collabora on • Unified method for #includes • Maintaining private code trees and #defines • Enforced source code layout • Dependencies and APIs
• Build • System configura on (a la • Configura on Device Tree) • Mul ple targets • Toolchains • Source code layout • Target management rd • 3 party SDKs • SDK compila on rules
• Go Small or Go BIG • Package Management • VCS Versioning • Versioning and stability • Versioning Scheme (major, minor, rev) • Tracking branches
Build and Package Management: newt tool (con nued)
• Ar facts • • Debugger maintenance bin/ directory, with object files • Mul ple targets stored simultaneously • Genera on of flash images, • upgradable images Compiler defini ons, map files
• Introspec on • Size • Display dependencies • Packages • Search for func onality • Versions • Versions installed – tracking branches
• Enforced Hierarchy • HW: MCU, BSP • BSP + App = BUILD • APP • BSP -> MCU defini on • System Defini on • Split images for upgrade • Linker sec ons defined by system • RAM loca ons • Tie-in with flash layout • Flash Highlight: Apache Mynewt Security
• Unique device iden fica on Provisioning • Cer ficate Management • Prevent counterfei ng
• Signed firmware images (newt tool) Upgrade • Secure bootloader
• Leverage either BLE or DTLS security Communica ons • RBAC for commands based upon iden ty
• Encrypted flash storage Data and Tamper • TPM/Smart Card aware • Support hardware key access
Designed for security from the ground-up Hardware Pla orm Support
• Suitable for single-chip / host BLE designs Nordic Semiconductor • Controller-only opera on with host processor nRF51/52 • Cost-effec ve nRF51, powerful nRF52
• Host processor, popular for BLE + Wi-Fi • ST Micro Offload processor for DSP processing STM32F/L34 • Extensive, quality peripheral support • L* series provides reduced power consump on
• Extensive low power modes and opera on Atmel • Rich set of peripherals SAMD/L21 • Community-supported: Arduino Zero series
More Coming Soon!
Cross pla orm support provides flexibility and price leverage What’s Next?
• More boards(!) and processors(!) • PIC32MZ (MIPS - underway), NXP FRDM-K64, NXP KW41Z, STM32 L4
• Wireless • Bluetooth 5 and Bluetooth Mesh • LPWA • Improved Wi-Fi
• Wired: Ethernet
• Sensor APIs and Sensor Management
• You Decide! • More informa on: h p://mynewt.apache.org/
• Join the development, subscribe to dev@ list.
• Contributors welcome!
THANK YOU