FreeRTOS and CMSIS-RTOS (use or not use?)

Hi there,
this is perhaps a question answered already many times but here it goes.

Should I use CMSIS-RTOS or not ?
What are the advantages(portability obvioulsy) and disadvantages?

Greetings

CMSIS-RTOS lets you change what RTOS you will be using with minimal other changes. The cost is that you will be programming to a minimum common capability expected out of an RTOS.

The biggest advantage to doing so is if something happens to the RTOS you started with, you can easily switch, but that seems unlikely with FreeRTOS. The other possible reason assumes that you just use the CMSIS-RTOS for the base functions, and directly code for more advanced, and then you reduce the cost to switch to another if you need a feature not supported by the one you are using. Not sure if that is really worth it.

The biggest disadvantage is you are stuck with the lowest common denominator interface, unless you do the advanced things directly, but then you have lost most of the advantage of using the wrapper, and you need to worry about how the wrapper interacts with direct calls (does the wrapper give you access to the needed raw handles). Then you have the added overhead of the wrapping layer. It also gives you a false sense of portability, as it is intentionally designed to guide you to use ARM processors (understandably, since it comes from ARM), so it doesn’t help as much going to other processors

Personally, I don’t use things like CMSIS-RTOS, but instead my own “wrapper” that is in C++ to make an object based interface, that still allows the direct operation with the primitives at the C level if needed.

2 Likes

Hi @richard-damon , many thanks for your input on this topic.
Yes, I was also having the same conclusions. But since I never used CMSIS, I was not confident about it. BeBesides, wherever I was reading about CMSIS was like “the best thing ever for portability” and " make your life easy" etc .
I assume it doens’t make much sense using CMSIS. Losing performance and functionalities all in sacrifice for portability(and that just for ARM processors).