Mbed OS 5.7 released: Focus on robustness, connectivity and ease of use


/media/uploads/dirons/mbedos57banner.png

The Arm Mbed OS 5.7.0 release helps to further simplify the Internet of Things (IoT) and embedded product development with the addition of several new features, such as the high-integrity embedded file system, which provides power loss resilient operation and maximizes the life of the external memory block device by implementing wear leveling techniques. The release also includes an open-source mesh networking stack, which is IPv6, 6LoWPAN and one of the only two open-source certified Thread networking stacks. This release also continues our efforts to add comprehensive documentation for Mbed OS. Our ongoing efforts in this area include adding documentation about contributing and using our platform, drivers, RTOS, connectivity and storage APIs, as well as information about our tools. This release also includes improvements to the user experience of our documentation.

In addition, this release contains many minor fixes and enhancements and brings support for 103 target development boards. In the release note below, we summarize some of the key updates to Mbed OS that are part of the Mbed OS 5.7.0 release.

Core OS and storage

High-integrity embedded file system

Mbed OS introduces a robust, high-integrity embedded file system, which prevents risks of serious data loss due to power loss and significantly improves the life of external block memory by implementing dynamic wear leveling algorithms. Some of the key features are:

Power loss resilience - The high-integrity embedded file system works consistently through random power failures. During file system operations, the storage on disk is always kept in a valid state. Also, to protect failure, in case of updating a file, the original file remains unmodified until the file is closed or sync is called.

Wear awareness - The high-integrity embedded file system considers write errors reported by the underlying block device and uses dynamic wear leveling to manage blocks that go bad during the lifetime of the file system.

Support to SPI NOR Flash and SD cards – We specifically designed it to work on SPI NOR flash and SD cards.

Along with the traditional FAT file system, the high-integrity embedded file system enhances the storage portfolio of Mbed OS by providing robust and power resilient operation. More information on the high-integrity embedded file system is available at https://os.mbed.com/docs/v5.7/reference/littlefilesystem.html and is currently in early release.

New drivers and platform APIs

In the Mbed OS 5.7.0 release, we have also added several new drivers and platform APIs. One of the notable additions includes the ConditionVariable class.

ConditionVariable class: The ConditionVariable class provides a mechanism to safely wait for or signal state changes. A common scenario when writing multithreaded code is to protect shared resources with a mutex and then release that mutex to wait for a change of that data. If you do not do this carefully, this can lead to a race condition in the code. A condition variable provides a safe solution to this problem by handling the wait for a state change, along with releasing and acquiring the mutex automatically during this waiting period. For more information, please visit https://os.mbed.com/docs/v5.7/reference/conditionvariable.html

Connectivity

Open-source mesh networking stack

We’ve invested many years effort in building a robust and scalable mesh networking stack, which runs on the 802.15.4 radios. Some of the key principles of this technology are an ability to self-heal the mesh routing and also optimize for low power. The mesh stack has many uses, and the key features are:

• IPv6/6LoWPAN for 2.4GHz and subGHz.

• Thread® 1.1 certified for interoperability in connected home applications.

• Mesh link establishment (MLE) for safe, dynamic and reconfigurable radio link establishment.

• RPL routing protocol.

The IPv6 and 6LowPAN components are Apache 2.0 licensed, and the Thread extensions are under a BSD 3-clause license. Mbed OS applications can use the Mesh and Socket APIs. To use the mesh stack, check the example application mbed-os-example-mesh-minimal. More information on the open-source mesh networking stack is available at https://os.mbed.com/docs/v5.7/tutorials/mesh.html#nanostack

Upcoming APIs

Mbed OS thrives on the large ecosystem and support from leading silicon vendors. Mbed OS has several MCU targets and 103 development boards currently supported and Mbed Enabled. Adoption of Mbed OS APIs by the ecosystem ensures that you have a seamless experience. This section indicates what will be in the upcoming releases from the Mbed OS team and enabled by Silicon and Device Partners. To know more, please visit https://github.com/ARMmbed/mbed-os/

LoRaWAN API

We are adding a LoRaWAN API to Mbed OS to enable building LoRaWAN end points with integrated Mbed OS stack. We will integrate the LoRaWAN stack as part of Mbed OS and allow developers easy way to connect and use LoRaWAN technology. Integrated stack will be tested with several modules to enable fast product integration.

QuadSPI API

A quad SPI driver enables multiple I/O SPI devices capable of supporting increased bandwidth or throughput from a single device. Some of the advantages of quad SPI include high speeds and requires few pins. Several MCUs and memory vendors are adding support for Quad SPI, and it is popular among the use cases that need high bandwidth, such as multimedia, richer graphics and other data-intensive content needing external memory.

Watchdog API

We are looking to add a watchdog API to Mbed OS to detect and recover from system malfunctions during remote management operations, such as updating the device firmware. The initial watchdog use cases that would be supported are; setting the watchdog, feeding the watchdog, reading the current watchdog status and reading the MCU reset reason.

MicroSecond and LowPowerTicker API

Power consumption is one of the most important design requirements for IoT devices. Meeting the power budget is becoming challenging because systems today include more sensors, faster responses and more connectivity. We are looking to add a low-power timer with lower accuracy to Mbed OS, which would help to enable the tickless mode and save power. We are also looking to add a unified 64-bit time stamp, allowing devices to seamlessly handle different widths of timers. We plan to enable better low-power performance by adding the feature to turn off the time when the time is not in use.

RTC API

The real-time clock (RTC) keeps track of the current time in computers and embedded devices. We are looking to update the RTC API to specify behaviour that enables it to survive reset and provide the true time.

Targets and tools

Thanks to our partners’ hard work, Mbed OS 5.7 added 10 new target platforms and now supports 103 target platforms. We’ll continue to add targets in our biweekly patch releases as partners work with us on support.

Fixes and changes

The release includes many general enhancements and fixes and upstream those that we have maintained within the Mbed OS codebase itself. Please visit https://os.mbed.com/releases/ for a full list of changes and known issues. The upgrades should be transparent to developers using the Mbed OS RTOS APIs, but please report in the forums or contact us at support@mbed.com if you have any issues in this area.

Testing

We designed Mbed OS to significantly reduce cost and time for embedded software development by providing a production-quality toolset and code. We are committed to delivering high-quality code working across all supported boards and platforms. To ensure all the features of code meet our quality control requirements, we have built an automated testing environment and processes that perform rigorous testing on every line of code. The continuous integration framework is a highlight of our testing framework.

Continuous integration framework

The continuous integration framework ensures that every new feature and change in Mbed OS is tested, so that:

• For every new feature, we create tests that we then deliver to our partners. For every board to be Mbed Enabled, we need our partners to successfully conduct these tests.

• Partners must test the changes on their boards before submitting pull requests (PRs) on GitHub.

• Once the PR is submitted, the Mbed OS gatekeepers manually review the code to ensure it meets the coding guidelines and code standards.

• Once approved by gatekeepers, the code goes through the automated test setup, which adds code to Mbed OS for testing and builds examples across all the platforms, such as IAR, ARM and GCC.

• During the testing phase, we select the combination of boards and devices that support a variety of peripherals, MCU cores and features for maximum coverage.

• To ensure the Mbed OS code is compatible with all the IDEs, we test that the code is exporting properly to all the compilers.

• We merge the PRs only if the all the above procedures are successful.

Following is the summary results for testing conducted for Mbed OS 5.7.0:

• Total test time is 10125 hours on actual development boards. Time almost doubled since we are testing nightly on every PR.

• We have added 111 new test cases since the Mbed OS 5.6.0 release to test new and existing features on Mbed OS. The number of total test cases is 423.

• We performed 566,440 example builds since the Mbed OS 5.6.0 release.

• The total number of binaries built is 17,869,800 since the Mbed OS 5.6.0 release.

We plan to share more details about testing processes, such as our out-of-box testing coverage and system testing in upcoming release blogs.

Using the release

Mbed CLI

When you create a new program, Mbed CLI automatically imports the latest Mbed OS release. Each release includes all the components: code, build tools and IDE exporters. If you want to update your Mbed OS version or existing program to Mbed OS 5.7.0, run the CLI command mbed update mbed-os-5.7

Mbed Online Compiler

When you create a new program, Mbed online compiler automatically uses the latest Mbed OS release. If you want to update your Mbed OS version, right click on mbed-os library and press update.

/media/uploads/dirons/mbedos57blog.png

You can also fetch the latest version of the Mbed OS 5.7 release using Mbed CLI

commandline

..
C:\dev\myprogram>cd mbed-os
C:\dev\myprogram\mbed-os>mbed update mbed-os-5.7
C:\dev\myprogram\mbed-os>cd ..
C:\dev\myprogram>
..

Please feel free to ask any questions or provide feedback about this release on the forum, or to contact us at support@mbed.org.

Please log in to start a discussion or ask a question.

Discussion topics

TopicRepliesLast post
Wow! 0 28 Dec 2017 by Aaron Minner