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

Getting a working baseline

Create forks

Please fork or branch the following repositories:

Get the Mbed OS source code

The following Mbed CLI commands retrieve and fork the mbed-os-example-blinky code, and redirect mbed-os to point to the newly forked mbed-os repository:

git clone mbed-os-example-blinky
cd mbed-os-example-blinky

Delete the file mbed-os.lib (rm mbed-os.lib on Linux/macOS, del mbed-os.lib on Windows).

Next, add your fork of mbed-os (change the URL to match your repository).

mbed add https://github.com/ARMmbed/mbed-os-new-target mbed-os

Next, set up the upstream remote, and create a branch for the new port.

cd mbed-os
git remote add upstream https://github.com/ARMmbed/mbed-os
git checkout -b <branch_name>

Build the Blinky program for an existing target

To verify that you have a working fork, please build Blinky to a supported target:

cd mbed-os-example-blinky
mbed compile --target K64F --toolchain GCC_ARM
mbed compile --target K64F --toolchain ARM
mbed compile --target K64F --toolchain IAR

Verify the build succeeds. Make sure the program runs correctly, if it fails, please see the debugging page.

You now have a working baseline and are ready to add a new target.

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.