SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
29 September 2017
Modular	Middleware	Components	in	Apache	Mynewt
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.
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
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/
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/
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/
Deep Network Protocol Stack Support: e.g., NimBLE
https://mynewt.apache.org/latest/network/ble/ble_intro/
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)
Newt Build+Package Management Tool
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.
Thank You

Mais conteúdo relacionado

Semelhante a Modular middleware components in Apache Mynewt OS - SFO17-507

Semelhante a Modular middleware components in Apache Mynewt OS - SFO17-507 (20)

Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticians
 
Flexible compute
Flexible computeFlexible compute
Flexible compute
 
Basic concepts for_clustered_data_ontap_8.3_v1.1-lab_guide
Basic concepts for_clustered_data_ontap_8.3_v1.1-lab_guideBasic concepts for_clustered_data_ontap_8.3_v1.1-lab_guide
Basic concepts for_clustered_data_ontap_8.3_v1.1-lab_guide
 
Best Practices and Performance Studies for High-Performance Computing Clusters
Best Practices and Performance Studies for High-Performance Computing ClustersBest Practices and Performance Studies for High-Performance Computing Clusters
Best Practices and Performance Studies for High-Performance Computing Clusters
 
2689 - Exploring IBM PureApplication System and IBM Workload Deployer Best Pr...
2689 - Exploring IBM PureApplication System and IBM Workload Deployer Best Pr...2689 - Exploring IBM PureApplication System and IBM Workload Deployer Best Pr...
2689 - Exploring IBM PureApplication System and IBM Workload Deployer Best Pr...
 
Red hat Enterprise Linux 6.4 for IBM System z Technical Highlights
Red hat Enterprise Linux 6.4 for IBM System z Technical HighlightsRed hat Enterprise Linux 6.4 for IBM System z Technical Highlights
Red hat Enterprise Linux 6.4 for IBM System z Technical Highlights
 
Study notes for CompTIA Certified Advanced Security Practitioner (ver2)
Study notes for CompTIA Certified Advanced Security Practitioner  (ver2)Study notes for CompTIA Certified Advanced Security Practitioner  (ver2)
Study notes for CompTIA Certified Advanced Security Practitioner (ver2)
 
Open Cloud Storage @ OpenStack Summit Paris
Open Cloud Storage @ OpenStack Summit ParisOpen Cloud Storage @ OpenStack Summit Paris
Open Cloud Storage @ OpenStack Summit Paris
 
Data Base Connector
Data Base Connector Data Base Connector
Data Base Connector
 
OpenNebulaConf2017EU: Elastic Clusters for Data Analysis by Carlos de Alfonso...
OpenNebulaConf2017EU: Elastic Clusters for Data Analysis by Carlos de Alfonso...OpenNebulaConf2017EU: Elastic Clusters for Data Analysis by Carlos de Alfonso...
OpenNebulaConf2017EU: Elastic Clusters for Data Analysis by Carlos de Alfonso...
 
Netflow Monitoring Standard Content Guide for ESM 6.8c
Netflow Monitoring Standard Content Guide for ESM 6.8cNetflow Monitoring Standard Content Guide for ESM 6.8c
Netflow Monitoring Standard Content Guide for ESM 6.8c
 
Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin  Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin
 
HPC and cloud distributed computing, as a journey
HPC and cloud distributed computing, as a journeyHPC and cloud distributed computing, as a journey
HPC and cloud distributed computing, as a journey
 
Bsp customization and porting of linux on arm cortex based i.mx6 processor wi...
Bsp customization and porting of linux on arm cortex based i.mx6 processor wi...Bsp customization and porting of linux on arm cortex based i.mx6 processor wi...
Bsp customization and porting of linux on arm cortex based i.mx6 processor wi...
 
Module 4 Embedded Linux
Module 4 Embedded LinuxModule 4 Embedded Linux
Module 4 Embedded Linux
 
final proposal-cloud storage
final proposal-cloud storagefinal proposal-cloud storage
final proposal-cloud storage
 
Seminar Accelerating Business Using Microservices Architecture in Digital Age...
Seminar Accelerating Business Using Microservices Architecture in Digital Age...Seminar Accelerating Business Using Microservices Architecture in Digital Age...
Seminar Accelerating Business Using Microservices Architecture in Digital Age...
 
Workflow Standard Content Guide for ESM 6.8c
Workflow Standard Content Guide for ESM 6.8cWorkflow Standard Content Guide for ESM 6.8c
Workflow Standard Content Guide for ESM 6.8c
 
IBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptx
IBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptxIBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptx
IBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptx
 
Successful Patterns for running platforms
Successful Patterns for running platformsSuccessful Patterns for running platforms
Successful Patterns for running platforms
 

Mais de Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

Mais de Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Modular middleware components in Apache Mynewt OS - SFO17-507

  • 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. 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. 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. 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. 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. Deep Network Protocol Stack Support: e.g., NimBLE https://mynewt.apache.org/latest/network/ble/ble_intro/
  • 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)
  • 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.