About this release
Mbed OS 5.8 focuses on Mbed Enabled modules to reduce development cost, time and risk and provide go-to market value compared to traditional chip down designs. We are continuing our focus on low power with our sleep/deep sleep profiling tool, with which you can identify objects that are stopping entry into low power modes. The 5.8 release continues to strengthen Arm's connectivity portfolio with an updated LPWAN stack and updated Cellular stack with support for IoT-ready NB-IoT and CAT-M1 technologies. We have also launched the closed alpha developer trial of Mbed Studio, a free desktop IDE designed specifically for Mbed OS.
In addition, this release contains many minor fixes and enhancements and brings support for 121 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.8.0 release.
Mbed Enabled modules
Time to market and going to production are key challenges for IoT products. Many IoT products rely on modules to reduce time and cost because modules provide integration, certification and ease of going from prototyping to production. We have expanded the Mbed Enabled program to include production modules preverified to support Mbed OS and associated connectivity protocols. The program provides a simple entry point to the marketplace, with mass production quality modules running high quality open source software and supporting a diverse suite of connectivity drivers and protocols. The Mbed Enabled Module program launched in February 2018 during Embedded World and Mobile World Congress where, along with our lead partners, we exhibited a range of mass production modules. For a list of modules currently available, please visit https://os.mbed.com/modules.
Core OS and storage
Sleep/Deep sleep profiling tool
Reducing power consumption is a key challenge for embedded devices. Sleep and deep sleep modes are some of the most used mechanisms to reduce power consumption. To better enable the use of sleep and deep sleep functions, you need to know which specific objects are blocking the device from entering sleep. The sleep/deep sleep profiling tool helps you determine what specific peripherals are blocking you from entering low power modes. The tool uses that information to optimize your system design to reduce power consumption when deployed. For more information on how to use this feature, please visit https://os.mbed.com/docs/v5.8/reference/power-management.html.
Generation of crash dump in fault exceptions
A fault exception occurs because of an error during normal or exception processing. There are several reasons for occurrence of fault exceptions. Some of the common reasons are execution of an undefined instruction, attempted load or store to an unaligned address and execution of an instruction from a never execute (XN) memory address. When system crashes or hard faults occur, a lack of crash information can make it difficult to triage the problem further. The system can appear to hang if there are no indications of fault exceptions. In such cases, the only way to find more information on the crashes is to reproduce the issue with an attached debugger to find the location and cause of the crash. Reproducing the issue can take longer if it is an intermittent or rare issue. Mbed OS has a new feature that generates crash dump in fault exceptions. Capturing the system context at the time of exception and emitting it through the serial port (or other mechanisms) provides valuable information, so you can triage the fault exceptions. For more information on how to use this feature, please visit https://os.mbed.com/docs/v5.8/tutorials/analyzing-mbed-os-crash-dump.html.
New drivers and platform APIs
In the Mbed OS 5.8.0 release, we have also added several new drivers and platform APIs. Two of the notable additions are the System_Reset and NVStore APIs.
System_Reset: This API is the official Mbed OS API to reset the processor and most of the subsystem. After the reset call, the processor and most components reset, but it does not affect the debug subsystem. For more information, please visit https://os.mbed.com/docs/v5.8/reference/power-management.html
MbedCRC class: The Mbed CRC class provides software CRC generation algorithms. We support precomputed ROM tables for 8/16-bit CCITT, 16-bit IBM and 32-bit ANSI polynomials. For more information, please visit https://os.mbed.com/docs/v5.8/reference/mbedcrc.html
NVStore: NVStore is a lightweight module that stores data by keys in the internal flash for security purposes. For each item key, the NVStore module provides the ability to set the item data or get it. Newly added values are added to the end of the existing data, superseding the previous value that was there for the same key. The NVStore module ensures that power failures don't harm existing data during any operation. For more information, please see https://os.mbed.com/docs/v5.8/reference/nvstore.html
Cellular stack now supports NB-IoT and CAT-M1
Cellular is enabling connectivity without complicated setup using a gateway. For IoT use cases, power and cost are more significant considerations than data throughput. This is where NB-IoT and CAT-M1 come in. Cellular IoT aims for simpler, low-cost modems tailored for slower, periodic transmissions and is expected to deliver better signal penetration to support devices located deep inside buildings.
Mbed OS version 5.8 supports cellular-based low power, wide area technologies (CAT-NB1 and CAT-M1). Mbed OS cellular APIs are designed to ensure that applications use modems and modules in consistent ways. For more information, please visit https://github.com/ARMmbed/mbed-os-example-cellular
LoRaWAN is a low-power wide-area network technology that combines kilometers of range with low power consumption, a great fit for Internet of Things devices. Arm is continuing its investment in LoRaWAN by adding a native LoRaWAN stack to Mbed OS 5.8. The stable, well-tested and (EU) precertified stack makes it easy for device manufacturers to add long-range connectivity to their IoT devices. For more information, please visit https://os.mbed.com/docs/v5.8/reference/lorawan.html
Upcoming APIs and Features
Mbed OS thrives on the large ecosystem and support from leading silicon vendors. Mbed OS has several MCU targets and 121 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, enabled by Silicon and Device Partners.
One of the key pieces of feedback that we received is that you’d like to see desktop tools, allowing you to write applications easily on top of Mbed OS. For that reason, we decided to develop a desktop tool, Mbed Studio, that supports application development, build, debug and, in the future, a great level of integration with our web services. With Mbed Studio, we're targeting application development as the focus, bringing together our command-line tools and utilities into an environment that allows you to begin quickly with a single installer. We currently provide desktop command-line tools and utilities, such as pyOCD and Mbed CLI, which you can use to build custom environments or for CI. However, we wanted to make the experience easier for users who are looking for a simple way to program and debug with Mbed. We now are almost ready to open Mbed Studio for closed alpha. If you’d like to volunteer as an alpha tester for Mbed Studio, please register your interest at https://os.mbed.com/studio
USB device stack
One of the key peripherals used in embedded devices is USB. Many devices need the USB device peripheral to support connecting their devices to a USB host, such as a computer. We are adding USB device support to Mbed OS, which allows you to enable the functionality of USB devices. This is available on a feature branch at https://github.com/ARMmbed/mbed-os/tree/feature-hal-spec-usb-device/hal
PSA Secure Partition Manager
We are adding a Platform Security Architecture (PSA) Secure Partition Management (SPM). SPM comes with a set of IPC APIs used to exchange data between secure partitions. The PSA IPC API Null implementation lays the groundwork for future hardware-based Secure Partition isolation. Although the code is still experimental, you can try it early on at feature branch at https://github.com/ARMmbed/mbed-os/tree/feature-spm
Targets and tools
Thanks to our Partners’ hard work, Mbed OS 5.8 added 18 new target platforms and now supports 121 target platforms. We’ll continue to add targets in our biweekly patch releases as partners work with us on support.
Mbed CLI update
We have added the repository caching feature to Mbed CLI to minimize traffic and reduce import times. Mbed CLI now caches repositories by storing their indexes under the Mbed CLI user config folder. Compared to a fully checked out repository, indexes are significantly smaller in size and number of files and contain the whole revision history of that repository. This allows Mbed CLI to quickly create copies of previously downloaded repository indexes and pull or fetch only the latest changes from the remote repositories. This dramatically reduces network traffic and download times, especially for big repositories such as mbed-os. For more information, please visit https://os.mbed.com/docs/v5.8/tools/working-with-mbed-cli.html#repository-caching
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 firstname.lastname@example.org if you have any issues in this area.
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.8.0:
- Total test time is 22,242 hours on actual development boards. This is more than double the total test time for the Mbed OS 5.7 release.
- We have added 95 new test cases since the Mbed OS 5.7.0 release to test new and existing features on Mbed OS. The number of total test cases is 816.
- The total number of binaries built since the Mbed OS 5.7.0 release is 31,491,613.
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
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.8.0, run the CLI command mbed update mbed-os-5.8
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.
You can also fetch the latest version of the Mbed OS 5.8 release from the mbed-os GitHub repository using the branch “mbed-os-5.8”. Please feel free to ask any questions or provide feedback about this release on the forum, or to contact us at email@example.com.