Arm Mbed Online Compiler
Create an Arm Mbed account
- Plug your Mbed board into your computer, and open its USB device folder.
- Double click on the
MBED.HTMfile. (This adds your Mbed platform to the Online Compiler.)
If you do not have an Mbed board, go to os.mbed.com/platforms, select a board and click Add to your Mbed Compiler.
Visit the Mbed OS Blinky example repository, and click "Import into Compiler button.
Click Compile. Your browser downloads the program as an executable file.
Open the folder where the executable file was downloaded, and then click and drag (or copy and paste) the file to your Mbed board's USB device folder.
Once you have flashed the file to the board, press the board's reset button. The LED blinks.
To debug using a desktop IDE such as Keil uVision, IAR or Eclipse, click the
Export button under
Program Details. Select your export platform and IDE, and click
Export. Your browser downloads a
.zip file with the project files.
Another way to do basic debugging is to use the
printf command in your code and then read the output using a serial terminal, such as PuTTY or CoolTerm. For example, add
printf("Hello World!\n\r"); to the top of your main function, and then recompile the program and flash it to your device.
Unless otherwise specified,
printf defaults to a baud rate of
9600 on Mbed OS. To determine which communication port your board connects to, follow the instructions for your operating system:
Open the Device Manager by pressing
Windows key + R. Type
devmgmt.msc, and click
Ports (COM & LPT), your Mbed board is listed as a
USB Serial Device next to its COM port.
dmesg | grep tty from your command-line.
Mac OS X
ls /dev/tty.* from your command-line.
Mbed OS examples - list of Mbed OS 5 example repositories.