I have some Problems with the mbed-os


I am a newbie in using the MBED IDE.
I have a nucleo-f401RE Board from STM and with the extansion board X-NUCLEO-IHM07M1 I would like to run a BLDC Motor with Hall Sensors.
Now I try to run the code with the Keil Studio Cloud.
I copy paste the code from this git hub rep.

I use mbed-os 5.2.0

In included file: 'device.h' file not found

Unknown type name 'DigitalOut'

Unknown type name 'PinName'

you see the main problem is unknown variables and problems with the includes.
If I have a whole path to the device.h i got a new problem.

Thank you for your help

Hmm, my best guess is that there’s a header in the code you imported named the same thing as an Mbed internal header. Or maybe something in the code is defining a macro that conflicts with Mbed OS internal stuff? You may have to add files from the BLDC stuff one by one until the issue shows up.

Also, side note, it would be easier to tell what’s going on if you compile the code and look at the compiler error message, as that’s a bit more reliable than the Mbed Studio IntelliSense


how we can see in the repo it is very old code (7-8years) and it is probably same one like here, which is related to old Mbed2 library.

All errors under line with error ‘mbed.h’ file was not found are related to this error because when the mbed.h it self was not correctly recognized, then also Mbed’s APIs can not be correctly recognized. The error was probably caused by bad import process.


  1. try to repeat it with new clean project.
  2. import the complet one with mbed2 lib - HelloWorld_IHM07M1 - Example application for X-NUCLEO-IHM07M1 board co… | Mbed

BR, Jan