MBed

Mbed is a platform and operating system for internet-connected IOT devices based on 32-bit ARM Cortex-M microcontrollers. It includes all the features needed to develop a connected product based on an Arm Cortex-M microcontroller, including security, connectivity, an RTOS(M, and drivers for sensors and I/O devices.

Applications for the Mbed platform can be developed using the Mbed online IDE, a free online code editor and compiler.

// Code Sample

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}

Code compilation:

The compilation process prints out information related to memory layout of the compiled code.

The executable code, constants and other read-only data get put in a section called "RO" (for read-only), which is stored in the FLASH memory of the device. Initialised static and global variables go into a section called "RW" (read-write), and the uninitialised ones in to one called "ZI" (Zero Initialise). These segments reside in the RAM.

The version control for the code is done using distributed Mercurial version control which is integrated with the IDE.


There are various hardware demo-boards for the Mbed platform, with the default being the original Mbed Microcontroller board. The Mbed Microcontroller Board (marketed as the "mbed NXP LPC1768") is a demo-board based on an NXP microcontroller, which has an ARM Cortex M3 core, running at 96 MHz, with 512 KB flash, 64 KB RAM, as well as several interfaces including Ethernet, USB Device, CAN, SPI, I²C and other I/O.

The target board for the code is displayed at the top right corner : LPC1768 in our case. Clicking on the board opens up a description for the board including the pinout details.

We can use "Add Board" or "Add Module" to add additional supported board/module to our IDE. For example:

List of Modules supported:

-- Advantech WISE 1570

-- Advantech WISE 1530

-- Advantech WISE 1510

-- uBlox ODIN W2

-- uBlox NINA B1

-- Multitech DragonFly

-- Multitech xDOT

Examples of boards supported include:

-- mbed LPC 11U24

-- NXP LPC 800 MAX

-- mbed LPC 1114FN28

-- EFM32 WONDER Gecko

-- GR PEACH

-- NUCLEO F334R8

Code once developed can be exported for the target board / toolchain using the export option as shown below.

This will generate a .bin file which in turn can be deployed to the physical board for validation.

The IOT device on which the software is deployed can be managed using ARM Pelian Device Management platform.


To view or add a comment, sign in

More articles by Prateek Khanna

  • Factors governing human behaviour

    Human behaviour is like an iceberg. We tend to perceive only the way a person responds in a given context, but we…

  • White Hydrogen

    White hydrogen is a naturally occurring, geological hydrogen found in underground deposits. White hydrogen is believed…

  • Chandrayaan 3 landing stages

    Chandrayaan 3 Lander Module (Vikram Lander) is orbiting the moon at 25 km * 134 km. It is expected to commence descent…

  • Smoothening mechanisms in Language Models

    Language Model A language model is a computational model or statistical framework that aims to capture and represent…

  • Union Budget 2022 and India’s Startup Ecosystem

    India has the third-largest number of startups in the world after the United States and China. The Indian startup…

  • Hydrogen economy

    Fossil fuels represents a significant import item for most major developing economies including India. India’s energy…

  • Cooperative & Competitive Strategy

    Strategy of a firm involves the following objectives- creating value, handling imitation and shaping its perimeter…

  • Drone Rules 2021

    Draft Drone Rules 2021 released on 15 July 2021 are proposed to supersede the Unmanned Aircraft System Rules 2021…

  • Multi-Level Intermediate Representation (MLIR)

    •MLIR : Multi-Level Intermediate Representation •Model -> MLIR -> Hardware Specific Code •MLIR is: •A representation…

  • LLVM-IR

    •LLVM is a compiler infrastructure •It is implemented as a set of reusable libraries •Implemented in C++ •Originally…

Insights from the community

Others also viewed

Explore topics