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

Debugging the quick start

Using printf

The easiest way to do basic debugging is to use the printf command in your code, 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.

Note: Unless otherwise specified, printf defaults to a baud rate of 9600 on Mbed OS. You can modify this value in the mbed_app.json file. To configure your terminal client to this baud rate, change the speed option when selecting the port. You can view the configuration options page to learn more about how to configure OS-level options.

Exporting to a desktop IDE

To debug using a desktop IDE such as Keil uVision, IAR or Eclipse, use the mbed export command to generate project files.

For example, for a K64F and Keil uVision:

$ mbed export --ide uvision --target K64F

Note: For a full list of supported exporters, run the mbed export --supported command.

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.