Mistake on this page?
Report an issue in GitHub or email us

Getting your program on your board

The Arm Mbed Online Compiler builds a file that can run on your board. All you need to do is:

  1. Select the correct board.
  2. Compile the code and download the compiled file.
  3. Copy the file to your board.

Selecting your board

Mbed programs can be built to run on multiple boards. The hard work is done behind the scenes by Arm Mbed OS itself. All you need to do is tell the Mbed Online Compiler which board you're building for.

To select a board as the build target:

  1. The compiler shows the current build board's name on the upper right corner:

    Showing current board. Click the board to open the full list

  2. Click the name of the board you need:

    Click a board to set it as the compilation board

    If the board isn't already on your list, go to the board's page on mbed.com and click the Add to your mbed Compiler button:

    Adding a board to the Mbed Online Compiler list

Compiling and downloading

The Compile menu offers five options:

  • Compile: builds code that you have modified since your last compile and downloads the built binary file to your default download location.
  • Compile All: same as compile, but rebuilds all source code, even if it hasn't changed since the last compile. Downloads the built binary file to your default download location.
  • Build Only: compiles your code but doesn't download the result.
  • Compile Macros: defines additional macros at compile time.
  • Update Docs: adds documentation.

Copying the file to the board

To run your program on the board:

  1. Connect your board to the computer over USB. It appears on your computer as removable storage.
  2. Navigate to your default download location. If the build has completed, your binary should be in this folder.
  3. Drag and drop the binary file to the board.

The device appears as removable storage, under the name MBED

Note: If you're working on Windows 7, you might need to install a driver to allow you to copy to your board. Please see the Windows Serial Driver section.

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.