Arm Mbed OS support forum

Mbed.h nowhere to be found - LED blink app compiles and run from web IDE but not from Mbed Studio

a) mbed.h is nowhere to be found
b) Despite of mbed not being shown , the example LED blink app does compiles on web IDE and properly run on my target (Nucleo -F767ZI).
c)) Neverthless when using Mbed Studio IDE (on WIndows 10) it cannot find the header file and therefore does not compile/run. NOTE: My target (Nucleo -F767ZI) has been automatically detected and set by Mbed Studio .
Please help! I see that multiple flavors of the same topic have been posted since years!


yes, it is possible. It can depend on some steps how did you create/import your project. First what you can try is to close and reopen MbedStudio or re-select your project, but if the issue persist then try to delete BUILD folder in your project.
I often use the F767ZI with MbedStudio, so it is working.

Similar issue
“mbed.h” not found because of BUILD folder - Mbed Studio / Bugs - Arm Mbed OS support forum

BTW if you have an issue with the MbedStudio try to put topic to section for MbedStudio and not MbedOS.

BR, Jan

Hi Jan, thank you very much for your input…but there is no folder called BUILD …the root folder of my project (automatically chosen by Mbed Studio, something that i totally displease) is C:\Users\DELL\Mbed Programs\mbed-os-example-blinky …under it i have main.cpp , CMakeLists.txt, README.txt,etc…anthe only 3 subfolders are .circleci , .github and resources …and i insist …mbed.h is nowhere in all those folders nor in the Mbed Studio installation path to be found! …how on earth would i know which functionality is already available from Mbed OS if i cannot even find the main header file on my computer??

automatically chosen by Mbed Studio, something that i totally displease

That is called Workspace and it can be changed, it can be had anywhere.
Just create a folder in a place and File->Open Workspace->Your path to new Workspace folder->Select folder

The mbed.h file can be found here - YourWorkspace\YourProjectName\mbed-os\mbed.h

And how I wrote above it depend how you create/import your project.
For example, if you import an old one with old mbed 2 library, then it will not work because MbedStudio support MbedOS 5.12+
So check if your project contain mbed-os and which version.

BR, Jan

Hello Juan Carlos,

In Mbed Studio navigate to the root directory of your project and in the terminal window issue the following command:

mbed deploy

That should find and add missing libraries to your project.
For more options use:

mbed -h

This link could be useful too.

thx…but as i said before, there is not such sub directory /mbed-os …i tried with LED blink application template with Mbed Os 6 and 5 …same result…

thank you Zoltan…but mbed is not recognized in my system : C:\Users\DELL\Mbed Programs\mbed-os-example-blinky>mbed -h
‘mbed’ is not recognized as an internal or external command,
operable program or batch file. …i did added manually D:\Programs\Mbed Studio to the PATH …but there is no mbed.exe at all in that path nor in its sub-folders…other than the Mbed Studio should i install other tools? Thank you!

Then try to right click on your project folder, chose Add Library... and place url to MbedOS repo -

MbedStudio installer contain all necessary things, no additional installation is needed. But how I remember, sometimes there were some bugs with submodules from installation. Solution was uninstall Mbed Studio, reset PC and install it again.

BR, Jan

Hi Jan, that finally solved my problem…i…e. i added the library from Github …i choose almost latest branch 6.13 (there is one V.NN-rc1 for each V.NN release, i have no idea what rc1 stand for) …after downloading and compiling Mbed OS and building i finally have a BUILD folder and do have now a mbed.h header etc…i really appreciate your kind and prompt support…Greetings from Shanghai! JC

You are welcome :slightly_smiling_face:

Anyway that behavior is not normal and if it will persist in the future, then try to reinstall whole MbedStudio.

I am not sure but the rcX probably mean Release candidate. First seems be always this Release candidate, where all new changes are merged together and then, probably after tests/verification, the final release coming - Tags · ARMmbed/mbed-os · GitHub

BR, Jan