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-empve, 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 Soware Foundaon? Cloud Providers IP Providers • Liberal, BSD-style license • Strong Licensing and IP policies • Meritocracy • Free to contribute, contributors control project direcon. • History of working with large organizaons: 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 operaon: low power hooks

• Driver Interface

• Pre-empve, multasking RTOS • Strict priority-based • Up to 253 different priority levels

• Unified buffer management

• Resource ulizaon tracking and watchdog

• High-resoluon 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 operaons: • Send an alert • Respond to a request • Schedule a wakeup

• Go back to sleep Apache Mynewt Connecvity Layer (Runme’s View)

Management App App OIC 1.1

CoAP, MQTT, HTTP

GATT TLS or DTLS

L2CAP TCP UDP

HCI IPv4 IPv6 + IPv6

BLE 4.2 Wi-Fi Bluetooth 5 LPWA 3GPP

1.0 – First beta end of October!

Standards-based IoT communicaon Highlights: Apache Mynewt Networking

• Nordic nRF51 and nRF52 support • Simultaneous Central and Peripheral modes • Supports up to 32 connecons Bluetooth • Combined (host + controller), host- 4.2 only and controller-only mode • Compable 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 nave-IP support. • Support for WINC1500...more soon! Highlights: Challenges Managing Connected Products

• Well-defined drivers and HAL interfaces Cross-plaorm • Build and package management system Support opmized to understand BSP and link opons

• Build tool creates signed images Soware • Image download over Serial, BLE and Wi-Fi Upgrade • Bootloader verifies SHA-256/RSA/ECC-DSA signature

• Consistent logging and stascs 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 collaboraon • Unified method for #includes • Maintaining private code trees and #defines • Enforced layout • Dependencies and APIs

• Build • System configuraon (a la • Configuraon Device Tree) • Mulple targets • Toolchains • Source code layout • Target management rd • 3 party SDKs • SDK compilaon 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 (connued)

• Arfacts • • Debugger maintenance bin/ directory, with object files • Mulple targets stored simultaneously • Generaon of flash images, • upgradable images Compiler definions, map files

• Introspecon • Size • Display dependencies • Packages • Search for funconality • Versions • Versions installed – tracking branches

• Enforced Hierarchy • HW: MCU, BSP • BSP + App = BUILD • APP • BSP -> MCU definion • System Definion • Split images for upgrade • Linker secons defined by system • RAM locaons • Tie-in with flash layout • Flash Highlight: Apache Mynewt Security

• Unique device idenficaon Provisioning • Cerficate Management • Prevent counterfeing

• Signed firmware images (newt tool) Upgrade • Secure bootloader

• Leverage either BLE or DTLS security Communicaons • RBAC for commands based upon identy

• Encrypted flash storage Data and Tamper • TPM/Smart Card aware • Support hardware key access

Designed for security from the ground-up Hardware Plaorm Support

• Suitable for single-chip / host BLE designs Nordic Semiconductor • Controller-only operaon with host processor nRF51/52 • Cost-effecve 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 consumpon

• Extensive low power modes and operaon Atmel • Rich set of peripherals SAMD/L21 • Community-supported: Arduino Zero series

More Coming Soon!

Cross plaorm 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 informaon: hp://mynewt.apache.org/

• Join the development, subscribe to dev@ list.

• Contributors welcome!

THANK YOU