Support for Mbed OS 6: Stable and mature APIs, Cloud services support, Enhancements to the Bare Metal Profile

We’re happy to announce updated support for the new Mbed OS 6 - a free, open-source embedded operating system designed specifically for the low-powered, constrained and connected devices.

Besides many great improvements, security updates, and bug fixes, Mbed OS 6 also brings a lot of breaking changes. Mbed OS 6 removes a great deal of deprecated functionality, heavily reduces the list of supported boards and platforms, only officially supported and well-maintained targets are left.

For this reason, we decided to support both Mbed OS6 and Mbed OS5 to allow our users to compile legacy Mbed projects on targets that don’t support OS6 to keep up with the latest platform updates. Each development platform now contains a list of deprecated boards that is used to dynamically select the proper version of Mbed OS (OS5 or OS6).

Major enhancements in Mbed OS 6 include:

  • Stable and mature APIs
  • Support for the most popular boards
  • Cloud services support
  • Improved Bare Metal Profile as a substitute for Mbed OS 2

What is new in 6.2.0:

  • Updated the Cordio stack to version 20.05
  • API updates for Wi-SUN networks

What is new in 6.1.0:

  • Enhancements for Arm’s Platform Security Architecture
  • Quality improvements for specific drivers

What is new in 5.15:

  • Support for static pin map tables
  • Support for GCC9
  • Reduced memory consumption

If for some reason you don’t want to use the latest Mbed OS 6, you can specify the package version using platform_packages option in platformio.ini file, e.g.:

platform = ststm32
framework = mbed
board = nucleo_f207zg
platform_packages =
    framework-mbed @ ~6.51504.0

Please note, the Teensy and Wiznet7500 platforms don’t support Mbed OS 6, so they can be used only with Mbed OS 5.

Use PlatformIO and its professional 1-Click solutions (PIO Unified Debugger, PIO Unit Testing) without dependencies to 3rd party tools or build systems. Everything works out-of-the-box. All famous operating systems (Windows, macOS, Linux) and over 10+ popular IDEs are ready to make you happy.



Your friends at PlatformIO


Hi @valeros, any idea when MBed OS 6.3 and 6.4 will be added platformio?
In any case, thanks a lot.


mbed 6.5 has been released a few days ago. Any plan to update mbed-os in platformio? If not, is there a simple way for me to use mbed 6.5 in a project? I have looked a bit in builder-framework-mbed but it does not look obvious to me how this code should be used to generate a local version of mbed usable in a platformio project.


Hi @douardda! Thanks for reminding. mbed will be updated this month if nothing critical comes up.

1 Like

Cool, thanks, Note that this release of mbed-os introduce a new build system based on cmake, not sure how this will impact the platformio integration.

1 Like

Meanwhile v6.6.0 is published.

Hi guys, v6.6.0 is pushed to the dev branches. Just use the upstream version of the desired platform, for example:

platform =
framework = mbed
board = nrf52_dk

Hi, what about the support for latest releases of mbed-os?

Is there an easy way of testing a new version of mbed-os from platformio? I mean just changing the value of the tag in the platform.json is not enough, so what is needed to test a new version os mbed-os?


The basic gist is that you fork mbed-os, add a package.json (see old C:\Users\<user>\.platformio\packages\framework-mbed file and adapt version) and add the platformio folder (builder scripts, GitHub - platformio/builder-framework-mbed: ARM mbed build script for PlatformIO Build System). You can then reference that fork as the source for framework-mbed through platform_packages.

Since the mbed-os version is above what the builder scripts expect, you may occassionally run into errors. I did when I just tested this using my fork and platformio.ini

platform = ststm32
board = nucleo_f103rb
framework = mbed
platform_packages =
monitor_speed = 9600

and src\main.cpp and mbed_app.json from platform-ststm32/examples/mbed-rtos-blink-baremetal at develop · platformio/platform-ststm32 · GitHub

with the error

ModuleNotFoundError: No module named ‘jsonschema’:

A missing Python dependency. So I opened a CLI, used pio system info to find the Python executable and then executed

<python path> -m pip install jsonschema

to install the missing dependency.

After that, a “Upload & Monitor” gives

 - framework-mbed 6.601500.210922+sha.d3c2a6db
 - tool-dfuutil 1.9.200310
 - tool-openocd 2.1100.0 (11.0)
 - tool-stm32duino 1.0.2
 - toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
Collecting mbed sources...
--- Miniterm on COM3  9600,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
This is the bare metal blinky example running on Mbed OS 6.15.0.

--- exit ---

So this is running mbed-os 6.15.0 now, compared to the latest framework-mbed 6.9.0 package available.

Thanks a lot! That was exactly what I was looking for. So I made a PR in platormio’s doc: Document how to use custom mbed-os version in platformio by douardda · Pull Request #214 · platformio/platformio-docs · GitHub :slight_smile:

1 Like