Building Mbed Together: an Overview of Mbed OS
Total Page:16
File Type:pdf, Size:1020Kb
Building mbed Together: An Overview of mbed OS Eric Yang Staff Applications Engineer, IoT BU ARM Tech Symposia China 2015 November 2015 mbed OS: Built for IoT at Scale Professional online/offline dev tools A component ® management Cloud IDE Keil MDK support Benefiting and build tool yotta GCC + ARMCC5 from TM mbed Enhancements backported Hardening for production devices OS from mbed OS Managing connected devices across vast Use of free and online tools networks Make microcontroller development easy End to end security in hardware and Rapid prototyping software mbed SDK/Classic mbed OS 2 © ARM 2015 mbed OS: Built for IoT at Scale Professional online/offline dev tools Available A component ® now management Cloud IDE Keil MDK support Benefiting and build tool yotta GCC + ARMCC5 from TM mbed Enhancements backported Hardening for production devices OS from mbed OS Managing connected devices across vast Use of free and online tools networks Make microcontroller development easy End to end security in hardware and Rapid prototyping software mbed SDK/Classic mbed OS 3 © ARM 2015 mbed OS Technology Preview Application Code Libraries mbed OS API Communication Management mbed Client mbed OS Device Management mbed TLS Core Schedulers Event BLE API IP Stack Energy Tasks Thread API mbed OS WiFi 6LoWPAN Thread BLE Drivers CMSIS-Core Debug Support Device Drivers mbed OS Secure Drivers SW Crypto Lifecycle Security uVisor uVisor Hardware Interfaces ARM Cortex® -M CPU Crypto Radio Sensor 4 © ARM 2015 mbed OS Technology Preview yotta Application Code Libraries component mbed OS API management Communication Management mbed Client mbed OS Device Management mbed TLS Core Schedulers Event BLE API IP Stack Energy Tasks Thread API mbed OS WiFi 6LoWPAN Thread BLE Drivers CMSIS-Core Debug Support Device Drivers mbed OS Secure Drivers SW Crypto Lifecycle Security uVisor uVisor Hardware Interfaces ARM Cortex-M CPU Crypto Radio Sensor 5 © ARM 2015 mbed OS Technology Preview yotta Application Code Libraries component mbed OS API management Communication Management mbed Client mbed OS Device Management mbed TLS Core Schedulers Event BLE API IP Stack Energy Tasks Thread API mbed OS WiFi 6LoWPAN Thread BLE uVisorDrivers CMSIS-Core Debug Support Device Drivers secure mbed OS Secure Drivers SW Crypto Lifecycle Security isolationuVisor uVisor Hardware Interfaces ARM Cortex-M CPU Crypto Radio Sensor 6 © ARM 2015 mbed OS Technology Preview yotta Application Code Libraries component mbed OS API management Communication Management mbed Client mbed OS Device Management mbed TLS mbed Client Core Schedulers Event BLE API IP Stack Energy Tasks Thread API mbed OS WiFi 6LoWPAN Thread BLE uVisorDrivers CMSIS-Core Debug Support Device Drivers secure mbed OS Secure Drivers SW Crypto Lifecycle Security isolationuVisor uVisor Hardware Interfaces ARM Cortex-M CPU Crypto Radio Sensor 7 © ARM 2015 mbed OS Technology Preview yotta Application Code Libraries component mbed OS API management Communication Management mbed Client Device Management mbed TLS mbed Client mbed OS Core Schedulers Event BLE API IP Stack Energy Tasks Thread API mbed OS WiFi 6LoWPAN Thread BLE uVisorDrivers CMSIS-Core Debug Support Device Drivers secure mbed OS Secure Drivers SW Crypto Lifecycle Security isolationuVisor uVisor Hardware Interfaces ARM Cortex-M CPU Crypto Radio Sensor 8 © ARM 2015 yotta . yotta is a tool that makes it easy to re-use software modules, and compose them together to form libraries, programs, and whole systems . Defines how modules are packaged, but not what they contain . Responsible for build system, managing configuration . Comes with a public registry of re-usable components . mbed OS is made up of many yotta modules, and mbed OS systems and applications are constructed and built using yotta 9 © ARM 2015 uVisor . A tiny, hypervisor/microkernel-like security kernel at the foundation of mbed OS . Creates and enforces secure isolation boundaries within the OS, between different parts of the system . Enables secrets to be strongly protected against software and network-bourn attackers . Efficient hardware enforcement through the memory protection unit (MPU) 10 © ARM 2015 uVisor – World View Security Functionality: Remainder of mbed OS: • Cryptography • HAL + Drivers • Key Management • Scheduler • Secure FW Upgrade • Connectivity Stack(s) • Secure Identity • Device Management • Security Monitoring • User Application Code and Libraries Isolated Strong Non-critical Separation uVisor 11 © ARM 2015 Thread . A secure wireless mesh network technology for your home . Built on proven, existing internet technologies . New security architecture makes it simple and secure to add / remove products . Supports very low power, sleepy devices . Application-layer agnostic, like WiFi . Leading support built into mbed OS . Choice of hardware portability for future proofed systems 12 © ARM 2015 mbed Client . Connects to mbed Device Connector and mbed Enabled Services Application and Service Integration . Included as part of mbed OS, also mbed Client C++ API portable to other platforms Device Connector including Linux and third party Support RTOS Protocol Implementations: LWM2M, CoAP, HTTP . Channel Security Implementations: TLS, DTLS Implements protocols and support for securely publishing resources Client Library Port (e.g. sensor data), and managing the mbed OS or RTOS/Linux + Networking device from the cloud 13 © ARM 2015 Accelerating pace of progress Fourth Release of 2015 Second Public mbed OS Release Investing in quality 14 © ARM 2015 Community Workflow •Partnership •Collaboration •mbed.com •Licensing •mbed Enabled •Testing •Continuous Integration Tools •yotta •IDEs •greentea •Developer Services 15 © ARM 2015 mbed is More Than an Operating System Systems and modules Developer tools, support and community Cloud and services partnership 16 © ARM 2015 Collaboration . Building the mbed ecosystem together allows us to: . Increase the effect of the effort put into it . Increase the overall developing power . Increase the reach and the network effect . Focus on our own core capabilities 17 © ARM 2015 Collaboration in Practice . All source code and binary blobs available on Github . Why binary blobs? 18 © ARM 2015 Licensing Application Code Libraries . Clear licensing model mbed OS API Communication Management mbed Client (CoAP, HTTP, LWM2M) . Apache 2.0 Device Management mbed TLS . Permissive Binary License mbed OS Core Schedulers Event BLE API IP Stack Energy Tasks Thread API . SPDX mbed OS WiFi 6LoWPAN Thread BLE Drivers CMSIS-Core Debug Support Device Drivers mbed OS Secure Drivers SW Crypto Lifecycle Security uVisor uVisor Hardware Interfaces ARMv6-M ARMv7-M Radio MCU ARM Cortex-M CPU Crypto Sensor 19 © ARM 2015 Permissive Binary License . Why is it needed? . There is no simple standard license for permissive binary use . Legal protection against reverse engineering . Clarity about patent grant . Valid use cases: . Technology specification under embargo 20 © ARM 2015 SPDX . What is SPDX? “The Software Package Data Exchange® (SPDX® ) specification is a standard format for communicating the components, licenses and copyrights associated with a software package.” . How do we use it? Copyright (c) 2014-2015, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0 21 © ARM 2015 Contributing . mbed Contributor License Agreement . In place for Github ID . If you just want to have it on the list: File an issue report . If you want to collaborate on adding / fixing: Send in a Pull Requests 22 © ARM 2015 Pull Request Requirements . Small purposeful minimal atomic commits . Concise and sensible one-line description . Further lines elaborate on reasoning of the choices taken, descriptions for reviewers and other information that otherwise might get lost. Documentation in code and repository should be updated . Pass our Continuous Integration testing . No confidential information, references to private documents or rudeness. 23 © ARM 2015 Component Development ARM CI ARMmbed/foo Setup v1.2.0 v1.2.1 1.2-bugfix v1.3.0 maintainer 24 © ARM 2015 Component Development ARM CI my CI Setup me/foo ARMmbed/foo Setup v1.2.0 v1.2.0 v1.2.1 v1.2.1 1.2-bugfix 1.2-bugfix v1.3.0 v1.3.0 feature contributor maintainer 25 © ARM 2015 Contribution Model (Pull Requests) ARM CI my CI Setup me/foo ARMmbed/foo Setup v1.2.0 v1.2.0 v1.2.1 v1.2.1 1.2-bugfix 1.2-bugfix v1.3.0 v1.3.0 feature pull request tests proposed merge contributor maintainer 26 © ARM 2015 Contribution Model (Pull Requests) ARM CI my CI Setup me/foo ARMmbed/foo Setup v1.2.0 v1.2.0 v1.2.1 v1.2.1 1.2-bugfix 1.2-bugfix v1.3.0 v1.3.0 feature pull request contributor maintainer 27 © ARM 2015 Component Management . yotta . a tool that we're building at mbed, to make it easier to build better software written in C, C++ or other C-family languages. Configure the component . Can bring in component’s dependencies (with version parameters) . Can take target platform into account . Can build the code and run the tests . Can publish code to the central registry 28 © ARM 2015 Registry . Self-contained store of all data for a software component . Contains full source code archive for each version . Smart dependency and version handling 29 © ARM 2015 Software Components . How to install? . What are the dependencies? . Where is the code repository? . Component License . How to build? 30 © ARM 2015 Division of Responsibilities . ARM is the lead maintainer for the core mbed Operating System modules . Silicon partners are responsible for their platform specific drivers . ARM will add them as platform specific dependencies for the relevant mbed OS modules 31 © ARM 2015 Parting Thoughts . We can help each other to make mbed a success . We want to encourage collaboration through: . Github . Clear licensing . Flexible component management . Any suggestions on making it better? Let us know! 32 © ARM 2015 Thank You The trademarks featured in this presentation are registered and/or unregistered trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved. All other marks featured may be trademarks of their respective owners.