Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Modular middleware components in Apache Mynewt OS - SFO17-507

203 views

Published on

Session ID: SFO17-507
Session Name: Modular middleware components in Apache Mynewt OS - SFO17-507
Speaker: James Pace
Track: LITE


★ Session Summary ★
To make application development a breeze, Apache Mynewt OS includes several optional middleware components and a build infrastructure to easily choose and configure them while creating an image for a target device. An example is the file system module with an API that allows the application to use file system operations without being tied to a particular file system implementation. Users are free to choose the FAT file system or Apache Mynewt’s Newtron Flash File System or any other FS of their choice. The logging infrastructure is another example. It allows applications, targets, and libraries to name and define their own log streams and direct them to desired output destinations. The stats module follows the same flexible design as the log module. The accompanying build and package management tool called the Newt Tool in the Apache Mynewt OS makes bundling and configuring the packages simple. It takes care of package dependency conflicts and automates toolchain selection to simplify testing and debugging. It allows components to be tested, versioned and released independently. Each component can therefore be decoupled from the other modules, allowing it to be shared and collaborated on across multiple operating systems. The steps for creating a log stream for a package will be presented as an example to demonstrate the design simplicity and modularity of the Mynewt OS and the power of the Newt tool.
---------------------------------------------------
★ Resources ★
Event Page: http://connect.linaro.org/resource/sfo17/sfo17-507/
Presentation:
Video:
---------------------------------------------------

★ Event Details ★
Linaro Connect San Francisco 2017 (SFO17)
25-29 September 2017
Hyatt Regency San Francisco Airport

---------------------------------------------------
Keyword:
'http://www.linaro.org'
'http://connect.linaro.org'
---------------------------------------------------
Follow us on Social Media
https://www.facebook.com/LinaroOrg
https://twitter.com/linaroorg
https://www.youtube.com/user/linaroorg?sub_confirmation=1
https://www.linkedin.com/company/1026961

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Modular middleware components in Apache Mynewt OS - SFO17-507

  1. 1. 29 September 2017 Modular Middleware Components in Apache Mynewt
  2. 2. SFO-17-507: Modular Middleware Components in Apache Mynewt Description To make application development a breeze, Apache Mynewt OS includes several optional middleware components and a build infrastructure to easily choose and configure them while creating an image for a target device. An example is the file system module with an API that allows the application to use file system operations without being tied to a particular file system implementation. Users are free to choose the FAT file system or Apache Mynewt’s Newtron Flash File System or any other FS of their choice. The logging infrastructure is another example. It allows applications, targets, and libraries to name and define their own log streams and direct them to desired output destinations. The stats module follows the same flexible design as the log module. The accompanying build and package management tool called the Newt Tool in the Apache Mynewt OS makes bundling and configuring the packages simple. It takes care of package dependency conflicts and automates toolchain selection to simplify testing and debugging. It allows components to be tested, versioned and released independently. Each component can therefore be decoupled from the other modules, allowing it to be shared and collaborated on across multiple operating systems. The steps for creating a log stream for a package will be presented as an example to demonstrate the design simplicity and modularity of the Mynewt OS and the power of the Newt tool.
  3. 3. Apache Mynewt: Expansive OS for MCU-Class Devices Or, The Non-Denominational OS for Embedded? Apache Mynewt in a nutshell… MCUBoot: secure bootloader framework (now outside Mynewt) HAL and kernel; Drivers and Power Management Reusable, modular components: • nffs: newtron flash file system; • fcb: flash circular buffer; • statistics/logging framework; • deep network protocol stack support: e.g., NimBLE; • IoTivity-constrained for Apache Mynewt; • newt: build + package management tool. Secure Bootloader & FFS OS HAL Stats & Logging Console & Shell Config & Upgrade Networking Drivers Power Security
  4. 4. File System Abstraction and nffs, the newtron flash file system • File system abstraction layer (fs/fs) allows client code to be file system agnostic; • Support for multiple file systems; • Thread safe. https://mynewt.apache.org/latest/os/modules/fs/fs/fs/ nffs: newtron flash file system • Designed for minimal RAM usage; • Reliability; • Future enhancements: error correction, encryption, compression. https://mynewt.apache.org/latest/os/modules/fs/nffs/nffs/
  5. 5. fcb, flash circular buffer • Storage of elements in flash is done in a FIFO; • Elements can be appended to the end of the area until storage space is exhausted; • User has control over what happens next: • erase oldest block of data; • stop writing new data until existing data has been collected. • FCB treats underlying storage as an array of flash sectors; when it erases old data, it does this a sector at a time; • Elements in the flash are checksummed. That is how FCB detects whether writing element to flash completed ok. It will skip over entries which don't have a valid checksum. https://mynewt.apache.org/latest/os/modules/fcb/fcb/
  6. 6. statistics/logging framework • Statistics module allows application, libraries, or drivers to record statistics that can be shown via the Newtmgr tool and console; • Allows for easy integration of statistics for troubleshooting, maintenance, and usage monitoring; • By creating and registering statistics, they are automatically included in the Newtmgr shell and console APIs. • Log module supports logging of information within a Mynewt application; • Allows packages to define their own log streams with separate names; • Allows an application to control the output destination of logs. https://mynewt.apache.org/latest/os/modules/stats/stats/ https://mynewt.apache.org/latest/os/modules/logs/logs/
  7. 7. Deep Network Protocol Stack Support: e.g., NimBLE https://mynewt.apache.org/latest/network/ble/ble_intro/
  8. 8. IoTivity-constrained for Apache Mynewt • Why OCF in Apache Mynewt? • Requirement: application layer framework • …but on Nordic nRF51 SoC (16K RAM, 128K Flash) • CoAP, CBOR design decisions good for constrained environments • Respect for small frame sizes • Resource efficient on MCU • Apache Mynewt: replaced proprietary logging mechanism • Further reduced image size • Leveraged security framework; service/resource discovery intrinsic to OIC • Great for other use cases • Sensors, lighting • Perfect for Multi-transport • BLE or LoRa (small frames) or IP transports (typically 1500 byte MTU)
  9. 9. Newt Build+Package Management Tool
  10. 10. In Summary • There will be more than one 32-bit OS in the foreseeable future; • The corollary to a composable OS is that components can also be easily decomposed… • …and re-used across other initiatives; • The more re-use, the better for developers; • Re-use and the application of these components is happening now.
  11. 11. Thank You

×