7 years, 11 months ago.

Compile mbed application without source code

Hi all,

I am a newbie for ARM MBED OS. Although I have been searching it for a while, I couldn't find the answer to my question.

My question is as follows, I would like to develop MBED applications for my board but don't want to import mbed-os source from GitHub for all my applications. I would like to have the source code on my computer and reference to this location for all the applications I develop. How can I do that?

Thanks in advance for your kind answers.

1 Answer

7 years, 11 months ago.

Hi there,

Here's what I did to add an existing source directory of Mbed OS into a new project using Mbed CLI on my Macbook:

// clone a fresh copy of mbed-os onto the desktop
~/Desktop $ git clone https://github.com/armmbed/mbed-os
// create a new application folder
~/Repos/ $ mbed new app --create-only
~/Repos $ cd app
// use "mbed add" with the absolute path to your mbed-os directory
~/Repos/app $ mbed add ~/Desktop/mbed-os
// create a main.cpp file then compile
~/Repos/app $ mbed compile -t GCC_ARM -m K64F

You can also take a look at the comments on this GitHub issues page to read more about other options available including symbolic links: https://github.com/ARMmbed/mbed-cli/issues/580

Please let me know if you have any questions!

- Jenny, team Mbed

If this solved your question, please make sure to click the "Thanks" link below!

Accepted Answer