Real Time OS not found


Today I had to use thread and mutex… So looked if this kind of stuff exists and found RealTimeOS aka RTOS.
So let’s try it on my brand new F411RE.
Open Atom with platformIO, create a new project for the board, the past the example code and… ERROR on line #include "rtos.h"
So let’s go on the online compiler and do the same… Then ERROR again !
Do you know why ? May I missed a step or so ?

See my post about this! Threading in mbed OS

The word is that RTOS support is not yet implemented with mbed OS, but is soon coming.

Given that you use the online compiler I assume you’re using In that case, have you added mbed-rtos library to your project? If the library is not included it won’t find the header files :-).

Right click on the project -> Import Library -> From import wizard -> Search for ‘rtos’. Double click on the top hit (mbed-rtos) to add it to your project.

Finally I can import it with the online compiler as you said, but can’t do it with PlatformIO and Atom integration. Do you know if it’s possible to get the mbed-rtos library apart and then I import it separately to my IDE ?

If you right click on the project and select ‘Export’ again you’d get the full source including the rtos library. But you should also be able to add it in PlatformIO somehow.

Okay it works, I imported the lib in platformIO and everything works well… When I compile !

But now I’m not sure the thread works as they have to. I’ll do more tests / learn how it works.

Thanks guys,


Is this pertaining to mbed 2 or mbed 3 OS?

I don’t even know actually if I am using mbed 2, mbed 3, or mbed OS :open_mouth:
Can’t find the difference and what it change !

Now I am fighting with Thread and interruptions that seems to not work together :frowning: (I’ll open a new conversation in the forum)

mbed OS is mbed 3, and it isn’t supported on the online compiler, and it doen’t have rtos support yet. So this is pertaining to mbed 2.

1 Like

So what are the advantages of mbedOS if there is no rtos and no online compiler ?

I can’t give an extensive list, but in my opinion Yotta is a superior build system to the online compiler (includes package management, allows fully customizeable build configurations, allows users to pick their favorite code editor, doesn’t force code to be uploaded to a 3rd party website). And the new scheduler in mbed OS (minar) seems legit and user-friendly. And I’ve been told that the rtos module is coming.

Disclaimer: I’m not involved in the development of mbed or other ARM software. Maybe @janjongboom could add his perspective.

Ditto what Aaron said, plus - for many of us, the online compiler is a negative. It feels railroaded into a particular way of working (their editor + mercurial). And compiling mbed 2.0 locally feels clumsy and doesn’t seem open source.

Yep, I agree. We’re working on unifying the best of both worlds (ecosystem, RTOS vs. better build system, scheduler). We’ll share more information soon.

1 Like