Mistake on this page? Email us

Mbed OS Blinky tutorial

Get the Mbed OS Blinky example built and running on your board. Blinky is a simple application that blinks the LED on your development board every 500 milliseconds.

Setting up

  1. Create an Mbed account.
  2. Install Mbed Studio:

Creating a Blinky program

  1. From the menu, select File > New Program....

    The New program dialog box opens.

  2. From the Example program drop-down list, select in the MBED OS 6 list:

    • For the Mbed OS full profile: mbed-os-example-blinky
    • For the Mbed OS bare metal profile: mbed-os-example-blinky-baremetal
  3. The Program name field is automatically populated. You can edit it if you want.

    Mbed Studio sets the newly created program as the active program by default. For this quick-start, please leave the option selected.

  4. For the Mbed OS location, select Store Mbed OS in the program folder (+1GB). This will download a new copy of Mbed OS and store it in your program folder.

  5. Click Add Program.

    The program is loaded to your workspace and is the active program.

Selecting a build target and profile

  1. A build target tells Mbed Studio how to build Mbed OS so that it matches your hardware. To select a target, you can:

    • Connect your board to your computer. Mbed Studio detects the board and suggests a matching target.
    • Use the Target drop-down list. Your target name most likely matches the board name.

    Tip: If you don't have a board, pick any target you want.

  2. The default build profile is Debug, and we recommend you use it for this quick start.

Building and flashing to the board

To build:

  • If you don't have a board, click Build (the hammer icon). This builds Blinky and stops.

  • If you have a board connected, click Build and run (the play icon). This builds Blinky and flashes it to the connected board.

    You may need to restart your board for Blinky to run.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.