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:
- Select the correct board.
- Compile the code and download the compiled file.
- 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:
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
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.comand click the
Add to your mbed Compilerbutton:
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 resulting binary file.
- Compile All: same as compile, but rebuilds all source code, even if it hasn't changed since the last compile.
- 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
Note: If you're working on Windows, you might need to install a driver to allow you to copy to your board. Please see the Windows Serial Driver section.
Your board should appear on your computer as removable storage. To run your program on the board, simply drag and drop the file you downloaded in the previous section.
The device appears as removable storage, under the name