In this article, I would like to write about one of the components of Arm Mbed, and probably the most important part of it, Mbed OS. As I’ve been writing, there are two main Mbed OSs, Mbed OS 2 (also called mbed 2.0, mbed SDK, Classic, etc.) and Mbed OS 5. However, Mbed OS 2, as it is called Classic, is in maintenance mode, so I’d like to describe only Mbed OS 5 in this article.
What is Mbed OS 5?
First, I would like to introduce the architecture of a typical Mbed OS-enabled board, called Mbed Enabled, which is Arm’s certified Mbed OS-enabled board, as shown in the figure below, with DAPLink used as the debug interface and Mbed MCU The system is equipped with the Mbed OS 5. Of course, it is the Mbed MCU part of the figure that we develop using Mbed OS 5.
The part of Mbed MCU called “Application” is the application you will eventually develop using Mbed, so let’s skip it this time and introduce the other blocks in order.
RTOS
Mbed OS 5 supports Real Time Operating System (RTOS) as standard, and since RTOS is a type of operating system, you can assume that it is software that manages the computer’s resources, given that it is an operating system. These days, when you think of an operating system, you probably think of richer operating systems like Windows and Linux. These operating systems are computer operating systems for general-purpose use.
On the other hand, embedded systems using microcomputers are dedicated computers that are used for specific purposes, such as copiers and digital cameras. Microcomputers have very limited memory, processing speed and other resources compared to general-purpose computers in order to reduce costs, but they also require real-time control when controlling devices. A RTOS is an operating system that specializes in real-time control with limited resources. For this reason, RTOSs generally do not have a user interface (UI) like general-purpose computers have.
Mbed OS 5 uses a RTOS called Arm’s Keil RTX. This RTOS provides features such as communication between tasks (threads) and resource sharing. if you want to learn more about Mbed’s RTOS, please visit The RTOS overview is a good place to start.
Drivers
Perhaps this driver is the most important part of what makes the Mbed OS a platform, Arm Mbed.
As I mentioned earlier in the RTOS section, RTOS is an OS for a dedicated computer. Although the I/O (input/output) of a general-purpose computer is highly standardized, the software interface standard called CMSIS (Cortex Microcontroller Software Interface Standard) exists for Cortex-M, but the I/O The GPIO operation is not well standardized.
For example, the FreeRTOS supported by microcomputer manufacturers have different APIs for GPIO operations as well as serial protocols such as I²C, UART, and SPI, because each company implements its own I/O drivers.
Arm Mbed defines a standard API for this kind of I/O operation, and you can operate the I/Os by using this standardized API without being aware of the different implementations of I/O registers and so on in each microcontroller. This convenience is described in the first article “C/C++ Hardware Abstraction API”. You can refer to Drivers overview for the driver API.
For microcontroller infrastructure operations such as power management and timers, the Platform API is available.
Read
Connectivity
There are two main types of connectivity: network sockets, which are connectivity with IP networks, and non-IP network connectivity. Let’s start with the Network Socket, which supports connectivity with IP networks.
Network Sockets
Mbed OS has a built-in IP stack. The built-in IP stacks are lwIP, which is a well-known IP stack for embedded applications, and Nanostack. There is a ://os.mbed.com/docs/v5.9/reference/network-socket.html”>Network socket API, which abstracts IP connectivity.
This abstraction allows you to write applications that connect to IP networks without being aware of the various interfaces such as Ethernet, Wi-Fi, cellular, IEEE 802.15.4, etc. Wireless interfaces such as cellular and Wi-Fi need to be configured in order to connect to the network. The configuration of each of these wireless interfaces is done by using the Network Interfaces API is provided.
Non-IP Networks
The non-IP networks supported are Bluetooth low energy (BLE) and LoRaWAN. There are APIs for each of these networks, and the sample code for using these networks was introduced in the previous article.
Storage
The Storage API is provided as a means of storing data locally. In addition to the commonly used SD cards and eMMCs, a variety of media are supported, including SPI Flash memory, microcontroller RAM and built-in Flash. And the little file system (LittleFS) is now supported in Mbed OS 5.7.
LittleFS implements embedded features such as power-down tolerance and wear leveling (i.e., spreading out the blocks to be written to avoid concentrating writes to specific blocks of flash memory), as well as low memory usage. A blog post, LittleFS – A high-integrity embedded file system was published in There is.
Security
Encryption Function
One of the most widely used security features of Mbed OS is Mbed TLS. It is one of the few open-source TLS libraries used for embedded applications, and nowadays, you can often find it used on non-Mbed platforms as well.
Other Security Features
In addition to encryption, the software security feature uVisor, which is available in Mbed OS 5.10 with Arm PSA (Platform Security (Architecture) compliant Secure Partition Manager (SPM), which is expected to be replaced by the Secure Partition Manager (SPM). The security features are also being implemented for Cortex-M23 and Cortex-M33 support, and together with the aforementioned implementation of SPM and PSA compliance, the security features are headed for expansion.
Mbed OS 5 Release
There are three types of Mbed OS 5 releases: major, feature, and patch. mbed OS 5 is a major release, and as I noted in the LittleFS section, “from Mbed OS 5.7”, this is a feature release, and like LittleFS, it is a Mbed OS 5.7 has been patch-leased to Mbed OS 5.7.7 after Mbed OS 5.7.0, and these patch-leases include bug fixes, additional microcontrollers and boards for development targets, and other features that are supported by the board and microcontroller. Features are being added, etc. Not necessarily, but feature releases are generally once a quarter, and patch releases seem to happen every two weeks or so, and since Mbed OS 5.9 was released in June, the Mbed OS 5.10 mentioned in the security section will be released around September. It’s conceivable.
“もっと見る” カテゴリーなし
Mbed TLS overview and features
In this article, I'd like to discuss Mbed TLS, which I've touched on a few times in the past, Transport …
What is an “IoT device development platform”?
I started using Mbed because I wanted a microcontroller board that could connect natively to the Internet. At that time, …
Major Mbed-enabled devices
Even if you're starting to use Mbed, it can be difficult to decide which boards to actually target for development. …