Arm Mbed OS 5.9 release: Focus on low power, robustness and ease of use


/media/uploads/marianne/arm_mbed_os_5.9_image.png

About this release

Mbed OS 5.9 includes the release of device statistics APIs, which allow you to gather critical device information. This is a first step toward giving you power to remotely diagnose the health of IoT devices deployed in the field. Mbed OS 5.9 focuses on mainlining and increasing adoption of low power features, such as the microsecond ticker, low power timer, sleep manager and real time clock APIs.

Power consumption is one of the most important design requirements for IoT devices. Meeting the power budget is becoming challenging as the systems today include more sensors, faster responses and more connectivity. With the introduction of, and improvements to, key low power features, such as the microsecond ticker, low power timer, sleep and real time clock APIs, meeting tight power requirements and designing low power systems becomes straightforward.

This release also continues our efforts to add comprehensive documentation for Mbed OS. Our ongoing efforts in this area include adding documentation to our connectivity, RTOS and storage APIs, as well as information about our configuration system.

In addition, this release contains many minor fixes and enhancements and brings support for 135 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.9.0 release.

Core OS

Device statistics APIs: A major challenge in deploying and managing remote IoT devices is monitoring the overall health of the system. Identifying individual mis-performing devices can be challenging when many devices are deployed, and the cost of sending a technician to test devices in the field is very high. We are releasing device statistics APIs in Mbed OS 5.9 to enable device analytics on Mbed OS platforms. Our vision is to continue developing the APIs that provide information about the device and system health and to develop APIs that enable transmission of device health information over the network, so you can remotely monitor the health of your IoT device. The device statistics APIs in the Mbed OS 5.9 release are well-defined APIs that you can use to retrieve OS statistics and device information, such as memory usage, Thread information, stack usage data and runtime CPU load information. The implementation of these APIs is modularized, and it provides multiple APIs for each category. You can enable these separately using build time configuration.

For more information, please visit https://os.mbed.com/docs/v5.9/reference/mbed-statistics.html.

Low power features

The Mbed OS 5.9.0 release mainlines several low power features to enable long battery life and reduces power consumption to solve key challenges for embedded devices. The low power features were developed over the past few Mbed OS releases and adopted by Mbed Partners. Many platforms now support these features.

Tickless RTOS scheduler: In tickless operation, you don’t have to make the tradeoff between the high frequency timing interval, which consumes more power, and the low frequency timing interval, which results in suboptimal time keeping. The scheduler schedules the next timer tick in response to the next event rather than the fixed timer tick.

For more information, please visit https://os.mbed.com/docs/v5.9/reference/tickless.html.

Improvements to the microsecond ticker and low power timer: Tickers or timers are hardware timers that track small amounts of time. Mbed OS supports two types of tickers, the high-resolution microsecond ticker and the low power ticker. We have made several improvements to tickers. For example, our ticker now returns native value and configuration data, and the Mbed OS driver is responsible for frequency conversion.

For more information, please visit https://os.mbed.com/docs/v5.9/reference/microsecond-ticker.html.

Improvements to sleep modes: To save power, Mbed OS goes in sleep modes during idle loop. The sleep modes turn off the system clock when peripherals relying on it are not in use and saves power. We are making several improvements to sleep modes to enhance their functionality. We have APIs to demonstrate the peripheral status during sleep mode. The device must be able to wake up from specified sources. For sleep mode, it is any interrupt, and for deep sleep mode, it is watchdog, low power ticker or GPIO.

For more information, please visit https://os.mbed.com/docs/v5.9/reference/power-management.html.

Real time clock: The phrase "real time" differentiates this clock from a typical digital clock, which generates electrical pulses but doesn’t keep track of seconds or minutes. The real time clock enables the system to track time in human units. Usually, it continues to count over system resets, and the date and time remain correct even after you reset the system. RTC is often supplied with a dedicated battery to keep track of time during power loss. We have improved the real time clock support in Mbed OS. It now continues to keep counting during software reset, sleep modes and shutdown mode. Also, the improved accuracy is now below 100 ms.

Please visit https://os.mbed.com/docs/v5.9/reference/rtc-port.html for more information.

Improvements in error codes and error handling:

We are improving our error codes and error reporting infrastructure to ease development by enabling a standard way to describe, debug and communicate error scenarios. Improved error handling implementation provides features such as standardized error code and error status definitions, error handling APIs for error construction, error reporting with thread context, the ability to retrieve previous errors and the ability to save errors to the file system. We designed the error reporting APIs to be used from any context, such as ISR or Threads. The implementation also provides mechanisms for extending the error status definitions to report application specific errors and to extract information from error status values.

For more information, please visit https://os.mbed.com/docs/v5.9/reference/error-handling.html.

Connectivity

Ethernet MAC API (EMAC)

We have introduced a new EMAC API to bring unified support for Wi-Fi and Ethernet interfaces and make drivers independent of underlying network stacks. The new changes make it possible to use the same driver with both Nanostack and LWIP Stack. Working closely with our Silicon partners, the new EMAC feature is already available on boards and modules from Nuvoton, NXP, Realtek, Renesas, ST and u-blox.

Security

Update to Mbed TLS 2.10.0

Mbed TLS 2.10.0 provides support for the ARIA cipher and cipher suite for TLS (RFC-6209). Mbed TLS also contains optimizations to reduce code size or RAM, including an option for smaller AES tables. In addition, it contains many security and bug fixes over Mbed TLS 2.7.1, which was included with Mbed OS 5.8. You can access the Mbed TLS feature at https://github.com/ARMmbed/mbed-os/tree/master/features/mbedtls.

Targets and tools

Thanks to our Partners’ hard work, Mbed OS 5.9 added 14 new target platforms and now supports 135 target platforms. We’ll continue to add targets in our biweekly patch releases as Partners work with us on support.

Mbed CLI update and Python 3 support

We have updated all Mbed OS tools to be compatible with both Python 2 and Python 3 environments. This gives greater flexibility on system requirements because previous installations of Mbed OS required the use of Python 2. You can now choose which Python environment fits your needs. Our tools are backward compatible with all current and previous versions of Mbed OS for Python 2. It is only compatible with Mbed OS 5.9 and later for Python 3.

We have also added a built-in serial terminal feature to Mbed CLI. You can invoke the serial terminal using the “mbed sterm” command.

For more information, please visit https://os.mbed.com/docs/v5.9/tools/debugging.html#serial-terminal.

Fixes and changes

The release includes many general enhancements and fixes and upstreams 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.org 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 infrastructure, which tests the submitted code across multiple platforms using three toolchains: 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.

Below are the summary results for testing conducted for Mbed OS 5.9.0:

  • Total test time is 28,182 hours on actual development boards.
  • We have added 208 new test cases since the Mbed OS 5.8.0 release to test new and existing features on Mbed OS. The number of total test cases is 1,024.
  • The total number of binaries built since the Mbed OS 5.8.0 release is 40,561,560.
  • The total number of tests executed in continuous integration since the Mbed OS 5.8.0 release is approximate 19,000,000.

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

Arm 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.9.0, run the CLI command mbed update mbed-os-5.9

Arm Mbed Online Compiler

When you create a new program, the 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/marianne/updatembedoscompiler.png

You can also fetch the latest version of the Mbed OS 5.9 release from the mbed-os GitHub repository using the branch “mbed-os-5.9”.

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

You need to log in to post a discussion